From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
To: james.smart@broadcom.com
Cc: dick.kennedy@broadcom.com, jejb@linux.ibm.com,
martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org,
Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
Abaci Robot <abaci@linux.alibaba.com>
Subject: [PATCH] scsi: lpfc: lpfc_bsg: Remove set but unused variable 'offset'
Date: Tue, 27 Dec 2022 16:16:34 +0800 [thread overview]
Message-ID: <20221227081634.52182-1-jiapeng.chong@linux.alibaba.com> (raw)
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
reply other threads:[~2022-12-27 8:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221227081634.52182-1-jiapeng.chong@linux.alibaba.com \
--to=jiapeng.chong@linux.alibaba.com \
--cc=abaci@linux.alibaba.com \
--cc=dick.kennedy@broadcom.com \
--cc=james.smart@broadcom.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®