2023-02-09 03:52:40

by Jiapeng Chong

[permalink] [raw]
Subject: [PATCH] scsi: be2iscsi: Remove the unused variable internal_page_offset

Variable internal_page_offset is not effectively used, so delete it.

drivers/scsi/be2iscsi/be_cmds.c:1176:6: warning: variable 'internal_page_offset' set but not used.

Reported-by: Abaci Robot <[email protected]>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4011
Signed-off-by: Jiapeng Chong <[email protected]>
---
drivers/scsi/be2iscsi/be_cmds.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c
index 69b1a80e3687..0b59b63bce79 100644
--- a/drivers/scsi/be2iscsi/be_cmds.c
+++ b/drivers/scsi/be2iscsi/be_cmds.c
@@ -1173,7 +1173,6 @@ int be_cmd_iscsi_post_sgl_pages(struct be_ctrl_info *ctrl,
struct beiscsi_hba *phba = pci_get_drvdata(ctrl->pdev);
int status;
unsigned int curr_pages;
- u32 internal_page_offset = 0;
u32 temp_num_pages = num_pages;

if (num_pages == 0xff)
@@ -1192,7 +1191,6 @@ int be_cmd_iscsi_post_sgl_pages(struct be_ctrl_info *ctrl,
req->page_offset = page_offset;
be_cmd_page_addrs_prepare(req->pages, req->num_pages, q_mem);
q_mem->dma = q_mem->dma + (req->num_pages * PAGE_SIZE);
- internal_page_offset += req->num_pages;
page_offset += req->num_pages;
num_pages -= req->num_pages;

--
2.20.1.7.g153144c



2023-03-10 03:14:41

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH] scsi: be2iscsi: Remove the unused variable internal_page_offset

On Thu, 09 Feb 2023 11:52:24 +0800, Jiapeng Chong wrote:

> Variable internal_page_offset is not effectively used, so delete it.
>
> drivers/scsi/be2iscsi/be_cmds.c:1176:6: warning: variable 'internal_page_offset' set but not used.
>
>

Applied to 6.4/scsi-queue, thanks!

[1/1] scsi: be2iscsi: Remove the unused variable internal_page_offset
https://git.kernel.org/mkp/scsi/c/d0b50c64def4

--
Martin K. Petersen Oracle Linux Engineering