scsi: snic: Make snic_io_exch_ver_cmpl_handler() return void
authorJason Yan <yanaijie@huawei.com>
Sat, 18 Apr 2020 07:06:15 +0000 (15:06 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 24 Apr 2020 22:21:15 +0000 (18:21 -0400)
This function does not need a return value since no callers depend on
it. Make it return void.

This also fixes the coccicheck warning:

drivers/scsi/snic/snic_ctl.c:163:5-8: Unneeded variable: "ret". Return
"0" on line 228

Link: https://lore.kernel.org/r/20200418070615.11603-1-yanaijie@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/snic/snic.h
drivers/scsi/snic/snic_ctl.c

index de0ab5fc84742fd685d18c41dfd05a9ac1588df2..f4c666285bba52ddc2ff1ee0bda1821eefd97c71 100644 (file)
@@ -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);
 
index 449b03f3bbd381853c54f531054dca1e4e8cdc45..4cd86115cfb23d7bb790b9323fdddff4169074c6 100644 (file)
@@ -151,7 +151,7 @@ error:
 /*
  * 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 @@ exch_cmpl_end:
        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 */
 
 /*