* [PATCH] scsi: lpfc: lpfc_bsg: Remove set but unused variable 'offset'
@ 2022-12-27 8:16 Jiapeng Chong
0 siblings, 0 replies; only message in thread
From: Jiapeng Chong @ 2022-12-27 8:16 UTC (permalink / raw)
To: james.smart
Cc: dick.kennedy, jejb, martin.petersen, linux-scsi, linux-kernel,
Jiapeng Chong, Abaci Robot
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.
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3559
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/scsi/lpfc/lpfc_bsg.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
index 852b025e2fec..dd304f899f78 100644
--- a/drivers/scsi/lpfc/lpfc_bsg.c
+++ b/drivers/scsi/lpfc/lpfc_bsg.c
@@ -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;
}
--
2.20.1.7.g153144c
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-27 8:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-27 8:16 [PATCH] scsi: lpfc: lpfc_bsg: Remove set but unused variable 'offset' Jiapeng Chong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®