diff mbox series

scsi: lpfc: remove unneeded variable

Message ID 20210831114058.17817-1-lv.ruyi@zte.com.cn (mailing list archive)
State Accepted
Headers show
Series scsi: lpfc: remove unneeded variable | expand

Commit Message

CGEL Aug. 31, 2021, 11:40 a.m. UTC
From: Chi Minghao <chi.minghao@zte.com.cn>

Fix the following coccicheck REVIEW:
./drivers/scsi/lpfc/lpfc_scsi.c:1498:9-12 REVIEW Unneeded variable

Reported-by: Zeal Robot <zealci@zte.com.cm>
Signed-off-by: Chi Minghao <chi.minghao@zte.com.cn>
---
 drivers/scsi/lpfc/lpfc_scsi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

James Smart Sept. 2, 2021, 6:11 p.m. UTC | #1
On 8/31/2021 4:40 AM, cgel.zte@gmail.com wrote:
> From: Chi Minghao <chi.minghao@zte.com.cn>
> 
> Fix the following coccicheck REVIEW:
> ./drivers/scsi/lpfc/lpfc_scsi.c:1498:9-12 REVIEW Unneeded variable
> 
> Reported-by: Zeal Robot <zealci@zte.com.cm>
> Signed-off-by: Chi Minghao <chi.minghao@zte.com.cn>
> ---
>   drivers/scsi/lpfc/lpfc_scsi.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)

Looks Good - Thanks!

Reviewed-by: James Smart <jsmart2021@gmail.com>

-- james
Martin K. Petersen Sept. 14, 2021, 3:43 a.m. UTC | #2
On Tue, 31 Aug 2021 04:40:58 -0700, cgel.zte@gmail.com wrote:

> From: Chi Minghao <chi.minghao@zte.com.cn>
> 
> Fix the following coccicheck REVIEW:
> ./drivers/scsi/lpfc/lpfc_scsi.c:1498:9-12 REVIEW Unneeded variable
> 
> 

Applied to 5.15/scsi-fixes, thanks!

[1/1] scsi: lpfc: remove unneeded variable
      https://git.kernel.org/mkp/scsi/c/5d1e15108b8d
diff mbox series

Patch

diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 0fde1e874c7a..08a6ad79ceef 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -1495,7 +1495,6 @@  static int
 lpfc_bg_err_opcodes(struct lpfc_hba *phba, struct scsi_cmnd *sc,
 		uint8_t *txop, uint8_t *rxop)
 {
-	uint8_t ret = 0;
 
 	if (sc->prot_flags & SCSI_PROT_IP_CHECKSUM) {
 		switch (scsi_get_prot_op(sc)) {
@@ -1548,7 +1547,7 @@  lpfc_bg_err_opcodes(struct lpfc_hba *phba, struct scsi_cmnd *sc,
 		}
 	}
 
-	return ret;
+	return 0;
 }
 #endif