From patchwork Thu Jun 25 09:52:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maninder Singh X-Patchwork-Id: 6673711 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 27431C05AC for ; Thu, 25 Jun 2015 09:56:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4C7E620553 for ; Thu, 25 Jun 2015 09:56:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9091D2068D for ; Thu, 25 Jun 2015 09:56:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752397AbbFYJyb (ORCPT ); Thu, 25 Jun 2015 05:54:31 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:44077 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752222AbbFYJyS (ORCPT ); Thu, 25 Jun 2015 05:54:18 -0400 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NQH02185VIFT780@mailout4.samsung.com>; Thu, 25 Jun 2015 18:54:15 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.123]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 3D.47.24422.7CFCB855; Thu, 25 Jun 2015 18:54:15 +0900 (KST) X-AuditID: cbfee68f-f793b6d000005f66-7a-558bcfc7004f Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 7F.CC.05312.7CFCB855; Thu, 25 Jun 2015 18:54:15 +0900 (KST) Received: from localhost.localdomain ([107.108.92.210]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NQH00IQMVHC91L0@mmp1.samsung.com>; Thu, 25 Jun 2015 18:54:15 +0900 (KST) From: Maninder Singh To: nmusini@cisco.com, sebaddel@cisco.com, JBottomley@odin.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: pankaj.m@samsung.com, Maninder Singh Subject: [PATCH 1/1] scsi/snic: fixing the error print Date: Thu, 25 Jun 2015 15:22:16 +0530 Message-id: <1435225936-10250-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFLMWRmVeSWpSXmKPExsWyRsSkWvf4+e5Qg/nnLC3+r7/NYnF51xw2 i+7rO9gsDs9vY7H4smYvs8W9N1uZLLp/zWR0YPeY8nsjq8fhHz+YPfq2rGL0+LxJLoAlissm JTUnsyy1SN8ugSvj4pt1bAVbOSqeTd/D3sD4jK2LkYNDQsBE4urWzC5GTiBTTOLCvfVAYS4O IYGljBK7f+1mhkiYSPxpmg5mCwksYpS43eQIUfSTUWJ683Z2kASbgJ7Eql17WEBsEYEqiTd/ X4MtYBZwkpj+VQ/EFBYwk2h6WgNSwSKgKjF12n6wTl4Bd4ntx8+xQJyjIDFnkg3IdAmB72wS F35cYYOoF5D4NvkQVI2sxKYDUJdJShxccYNlAqPgAkaGVYyiqQXJBcVJ6UXGesWJucWleel6 yfm5mxiBQXr637P+HYx3D1gfYhTgYFTi4T1xrjtUiDWxrLgy9xCjKdCGicxSosn5wFjIK4k3 NDYzsjA1MTU2Mrc0UxLnXSj1M1hIID2xJDU7NbUgtSi+qDQntfgQIxMHp1QD43z1ziypiJZn v9VUTq3Uy2bu2ba8J2fH/K17Pi8pKJIvNW+ZUrSwV/bajPADKQqLPDRc/Rrl133eIjtB2cz2 +Lu+Tze6VfW/qIk+8FeQ1Q1l4g55vbvqq2W6luNf9rvl9+4fnmsmFDtnma1ODseUOyInbzgt MlC84ikq5vT/3s4Hf9f+WJ/ho8RSnJFoqMVcVJwIAJ9eLjtNAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmplkeLIzCtJLcpLzFFi42I5/e+xgO7x892hBr9uG1n8X3+bxeLyrjls Ft3Xd7BZHJ7fxmLxZc1eZot7b7YyWXT/msnowO4x5fdGVo/DP34we/RtWcXo8XmTXABLVAOj TUZqYkpqkUJqXnJ+SmZeuq2Sd3C8c7ypmYGhrqGlhbmSQl5ibqqtkotPgK5bZg7QCUoKZYk5 pUChgMTiYiV9O0wTQkPcdC1gGiN0fUOC4HqMDNBAwhrGjItv1rEVbOWoeDZ9D3sD4zO2LkZO DgkBE4k/TdOZIWwxiQv31oPFhQQWMUrcbnLsYuQCsn8ySkxv3s4OkmAT0JNYtWsPC4gtIlAl 8ebva6AGDg5mASeJ6V/1QExhATOJpqc1IBUsAqoSU6ftB+vkFXCX2H78HAtIiYSAgsScSTYT GLkXMDKsYhRNLUguKE5KzzXSK07MLS7NS9dLzs/dxAiOgmfSOxhXNVgcYhTgYFTi4U3Y1x0q xJpYVlyZe4hRgoNZSYS36yBQiDclsbIqtSg/vqg0J7X4EKMp0PKJzFKiyfnACM0riTc0NjE3 NTa1NLEwMbNUEuc9me8TKiSQnliSmp2aWpBaBNPHxMEp1cAornmkRipo0fsgkfCeRXzq7QsY gqWyl9vrsYX4ytv17GqyfsWXuKRE8sB7t61v7K1i1N7IKMg9jJga28amZHzzk/t73kmlCSnG Nmp2j3bv2cr1KuXCnedh6Zc82v54e7Qb7fbflbqtTfdz7rKFn0UmJuRmHlgwZ0d+/1bb8p/b sw4WGj1NnaLEUpyRaKjFXFScCADBDxdSmAIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently SNIC_HOST_ERR is called in both cases whether snic_disc_start returns zero or non-zero. From the code it looks like it has to print only if snic_disc_start return non-zero value, So calling SNIC_HOST_ERR only for non-zero return from snic_disc_start. Signed-off-by: Maninder Singh Reviewed-by: Rohit Thapliyal Acked-by: Narsimhulu Musini --- drivers/scsi/snic/snic_disc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/snic/snic_disc.c b/drivers/scsi/snic/snic_disc.c index 5f63217..8c29d5e 100644 --- a/drivers/scsi/snic/snic_disc.c +++ b/drivers/scsi/snic/snic_disc.c @@ -514,12 +514,9 @@ snic_handle_disc(struct work_struct *work) ret = snic_disc_start(snic); if (ret) - goto disc_err; - -disc_err: - SNIC_HOST_ERR(snic->shost, - "disc_work: Discovery Failed w/ err = %d\n", - ret); + SNIC_HOST_ERR(snic->shost, + "disc_work: Discovery Failed w/ err = %d\n", + ret); } /* end of snic_disc_work */ /*