diff mbox series

scsi: lpfc: make lpfc_sli_process_sol_iocb() void

Message ID 1604840518-12625-1-git-send-email-kaixuxia@tencent.com (mailing list archive)
State New, archived
Headers show
Series scsi: lpfc: make lpfc_sli_process_sol_iocb() void | expand

Commit Message

Kaixu Xia Nov. 8, 2020, 1:01 p.m. UTC
From: Kaixu Xia <kaixuxia@tencent.com>

The function lpfc_sli_process_sol_iocb() always return 1, so there's no
reason for a return value. In addition, no other functions will use the
return value of lpfc_sli_process_sol_iocb().

Convert lpfc_sli_process_sol_iocb() to a void function, and fix the
following Coccinelle warning:

./drivers/scsi/lpfc/lpfc_sli.c:3247:5-7: Unneeded variable: "rc". Return "1" on line 3372

Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
---
 drivers/scsi/lpfc/lpfc_sli.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index e158cd77d387..45c8cac61c76 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -3239,12 +3239,11 @@  lpfc_sli_iocbq_lookup_by_tag(struct lpfc_hba *phba,
  * is changed to IOSTAT_LOCAL_REJECT/IOERR_SLI_ABORTED.
  * This function always returns 1.
  **/
-static int
+static void
 lpfc_sli_process_sol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
 			  struct lpfc_iocbq *saveq)
 {
 	struct lpfc_iocbq *cmdiocbp;
-	int rc = 1;
 	unsigned long iflag;
 
 	cmdiocbp = lpfc_sli_iocbq_lookup(phba, pring, saveq);
@@ -3368,8 +3367,6 @@  lpfc_sli_process_sol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
 					 saveq->iocb.ulpContext);
 		}
 	}
-
-	return rc;
 }
 
 /**
@@ -3761,7 +3758,7 @@  lpfc_sli_sp_handle_rspiocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
 		switch (type) {
 		case LPFC_SOL_IOCB:
 			spin_unlock_irqrestore(&phba->hbalock, iflag);
-			rc = lpfc_sli_process_sol_iocb(phba, pring, saveq);
+			lpfc_sli_process_sol_iocb(phba, pring, saveq);
 			spin_lock_irqsave(&phba->hbalock, iflag);
 			break;