Skip to contentSkip to conversation

scsi: lpfc: lpfc_bsg: Remove set but unused variable 'offset'

PATCH New Jiapeng Chong 1 participant 1 message Dec 27, 2022

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

PATCH 1/1 scsi: lpfc: lpfc_bsg: Remove set but unused variable 'offset'

Variable offset is not effectively used in the function, so delete it.

drivers/scsi/lpfc/lpfc_bsg.c:2806:11: warning: variable 'offset' set but not used.

---
 drivers/scsi/lpfc/lpfc_bsg.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/lpfc/lpfc_bsg.c +1 -2
index 852b025e2fec..dd304f899f78 100644
@@ -2803,7 +2803,7 @@ diag_cmd_data_alloc(struct lpfc_hba *phba,
 {
 	struct lpfc_dmabufext *mlist = NULL;
 	struct lpfc_dmabufext *dmp;
-	int cnt, offset = 0, i = 0;
+	int cnt, i = 0;
 	struct pci_dev *pcidev;
 
 	pcidev = phba->pcidev;
@@ -2854,7 +2854,6 @@ diag_cmd_data_alloc(struct lpfc_hba *phba,
 		bpl++;
 
 		i++;
-		offset += cnt;
 		size -= cnt;
 	}
 
Signature · 1 line
2.20.1.7.g153144c