lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1604840518-12625-1-git-send-email-kaixuxia@tencent.com>
Date:   Sun,  8 Nov 2020 21:01:58 +0800
From:   xiakaixu1987@...il.com
To:     james.smart@...adcom.com, dick.kennedy@...adcom.com,
        martin.petersen@...cle.com
Cc:     linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        Kaixu Xia <kaixuxia@...cent.com>
Subject: [PATCH] scsi: lpfc: make lpfc_sli_process_sol_iocb() void

From: Kaixu Xia <kaixuxia@...cent.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@...cent.com>
Signed-off-by: Kaixu Xia <kaixuxia@...cent.com>
---
 drivers/scsi/lpfc/lpfc_sli.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

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;
 
-- 
2.20.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ