From patchwork Sat Apr 18 07:06:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Yan X-Patchwork-Id: 11496317 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 92DDA1392 for ; Sat, 18 Apr 2020 06:40:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 84B3C221EA for ; Sat, 18 Apr 2020 06:40:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726094AbgDRGkC (ORCPT ); Sat, 18 Apr 2020 02:40:02 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:46784 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725856AbgDRGkB (ORCPT ); Sat, 18 Apr 2020 02:40:01 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id EC554D323AF2793408FD; Sat, 18 Apr 2020 14:39:57 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Sat, 18 Apr 2020 14:39:49 +0800 From: Jason Yan To: , , , , , CC: Jason Yan , Hulk Robot Subject: [PATCH] scsi: snic: make snic_io_exch_ver_cmpl_handler() void Date: Sat, 18 Apr 2020 15:06:15 +0800 Message-ID: <20200418070615.11603-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org This function do not need a return value and no users use it's return value. So we can make it void. This also fixes the coccicheck warning: drivers/scsi/snic/snic_ctl.c:163:5-8: Unneeded variable: "ret". Return "0" on line 228 Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/scsi/snic/snic.h | 2 +- drivers/scsi/snic/snic_ctl.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/snic/snic.h b/drivers/scsi/snic/snic.h index de0ab5fc8474..f4c666285bba 100644 --- a/drivers/scsi/snic/snic.h +++ b/drivers/scsi/snic/snic.h @@ -399,7 +399,7 @@ void snic_handle_link_event(struct snic *); void snic_handle_link(struct work_struct *); int snic_queue_exch_ver_req(struct snic *); -int snic_io_exch_ver_cmpl_handler(struct snic *, struct snic_fw_req *); +void snic_io_exch_ver_cmpl_handler(struct snic *, struct snic_fw_req *); int snic_queue_wq_desc(struct snic *, void *os_buf, u16 len); diff --git a/drivers/scsi/snic/snic_ctl.c b/drivers/scsi/snic/snic_ctl.c index 449b03f3bbd3..4cd86115cfb2 100644 --- a/drivers/scsi/snic/snic_ctl.c +++ b/drivers/scsi/snic/snic_ctl.c @@ -151,7 +151,7 @@ snic_queue_exch_ver_req(struct snic *snic) /* * snic_io_exch_ver_cmpl_handler */ -int +void snic_io_exch_ver_cmpl_handler(struct snic *snic, struct snic_fw_req *fwreq) { struct snic_req_info *rqi = NULL; @@ -160,7 +160,6 @@ snic_io_exch_ver_cmpl_handler(struct snic *snic, struct snic_fw_req *fwreq) u32 cmnd_id, hid, max_sgs; ulong ctx = 0; unsigned long flags; - int ret = 0; SNIC_HOST_INFO(snic->shost, "Exch Ver Compl Received.\n"); snic_io_hdr_dec(&fwreq->hdr, &typ, &hdr_stat, &cmnd_id, &hid, &ctx); @@ -224,8 +223,6 @@ snic_io_exch_ver_cmpl_handler(struct snic *snic, struct snic_fw_req *fwreq) snic_release_untagged_req(snic, rqi); SNIC_HOST_INFO(snic->shost, "Exch_cmpl Done, hdr_stat %d.\n", hdr_stat); - - return ret; } /* end of snic_io_exch_ver_cmpl_handler */ /*