Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752223AbbFYJyg (ORCPT ); Thu, 25 Jun 2015 05:54:36 -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 X-AuditID: cbfee68f-f793b6d000005f66-7a-558bcfc7004f 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 v9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R: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1287 Lines: 41 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 --- 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 */ /* -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/