linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: snic: make snic_io_exch_ver_cmpl_handler() void
@ 2020-04-18  7:06 Jason Yan
  2020-04-27 20:21 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Yan @ 2020-04-18  7:06 UTC (permalink / raw)
  To: kartilak, sebaddel, jejb, martin.petersen, linux-scsi, linux-kernel
  Cc: Jason Yan, Hulk Robot

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 <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 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 */
 
 /*
-- 
2.21.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] scsi: snic: make snic_io_exch_ver_cmpl_handler() void
  2020-04-18  7:06 [PATCH] scsi: snic: make snic_io_exch_ver_cmpl_handler() void Jason Yan
@ 2020-04-27 20:21 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2020-04-27 20:21 UTC (permalink / raw)
  To: linux-kernel, sebaddel, jejb, linux-scsi, kartilak, Jason Yan
  Cc: Martin K . Petersen, Hulk Robot

On Sat, 18 Apr 2020 15:06:15 +0800, Jason Yan wrote:

> 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
> 
> [...]

Applied to 5.8/scsi-queue, thanks!

[1/1] scsi: snic: Make snic_io_exch_ver_cmpl_handler() return void
      https://git.kernel.org/mkp/scsi/c/6942d531e2d2

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-27 20:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-18  7:06 [PATCH] scsi: snic: make snic_io_exch_ver_cmpl_handler() void Jason Yan
2020-04-27 20:21 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).