Commit 6942d531 authored by Jason Yan's avatar Jason Yan Committed by Martin K. Petersen

scsi: snic: Make snic_io_exch_ver_cmpl_handler() return void

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.comReported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent baf3fbf2
...@@ -399,7 +399,7 @@ void snic_handle_link_event(struct snic *); ...@@ -399,7 +399,7 @@ void snic_handle_link_event(struct snic *);
void snic_handle_link(struct work_struct *); void snic_handle_link(struct work_struct *);
int snic_queue_exch_ver_req(struct snic *); 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); int snic_queue_wq_desc(struct snic *, void *os_buf, u16 len);
......
...@@ -151,7 +151,7 @@ snic_queue_exch_ver_req(struct snic *snic) ...@@ -151,7 +151,7 @@ snic_queue_exch_ver_req(struct snic *snic)
/* /*
* snic_io_exch_ver_cmpl_handler * snic_io_exch_ver_cmpl_handler
*/ */
int void
snic_io_exch_ver_cmpl_handler(struct snic *snic, struct snic_fw_req *fwreq) snic_io_exch_ver_cmpl_handler(struct snic *snic, struct snic_fw_req *fwreq)
{ {
struct snic_req_info *rqi = NULL; struct snic_req_info *rqi = NULL;
...@@ -160,7 +160,6 @@ snic_io_exch_ver_cmpl_handler(struct snic *snic, struct snic_fw_req *fwreq) ...@@ -160,7 +160,6 @@ snic_io_exch_ver_cmpl_handler(struct snic *snic, struct snic_fw_req *fwreq)
u32 cmnd_id, hid, max_sgs; u32 cmnd_id, hid, max_sgs;
ulong ctx = 0; ulong ctx = 0;
unsigned long flags; unsigned long flags;
int ret = 0;
SNIC_HOST_INFO(snic->shost, "Exch Ver Compl Received.\n"); SNIC_HOST_INFO(snic->shost, "Exch Ver Compl Received.\n");
snic_io_hdr_dec(&fwreq->hdr, &typ, &hdr_stat, &cmnd_id, &hid, &ctx); 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) ...@@ -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_release_untagged_req(snic, rqi);
SNIC_HOST_INFO(snic->shost, "Exch_cmpl Done, hdr_stat %d.\n", hdr_stat); SNIC_HOST_INFO(snic->shost, "Exch_cmpl Done, hdr_stat %d.\n", hdr_stat);
return ret;
} /* end of snic_io_exch_ver_cmpl_handler */ } /* end of snic_io_exch_ver_cmpl_handler */
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment