Skip to contentSkip to conversation

scsi: lpfc: remove unneeded variable

PATCH Applied [email protected] 3 participants 3 messages Aug 31, 2021 – Sep 14, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: lpfc: remove unneeded variable

From: Chi Minghao <[email protected]>

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

---
 drivers/scsi/lpfc/lpfc_scsi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/lpfc/lpfc_scsi.c +1 -2
index 0fde1e874c7a..08a6ad79ceef 100644
@@ -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
 
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · On 8/31/2021 4:40 AM, [email protected] wrote:

From: Chi Minghao <[email protected]>

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

---
  drivers/scsi/lpfc/lpfc_scsi.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

Looks Good - Thanks!

-- james