diff mbox series

[-next] scsi: lpfc: Remove set but not used variable 'sgl_size'

Message ID 1536804299-64730-1-git-send-email-yuehaibing@huawei.com (mailing list archive)
State Accepted
Headers show
Series [-next] scsi: lpfc: Remove set but not used variable 'sgl_size' | expand

Commit Message

Yue Haibing Sept. 13, 2018, 2:04 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/scsi/lpfc/lpfc_nvme.c: In function 'lpfc_new_nvme_buf':
drivers/scsi/lpfc/lpfc_nvme.c:2238:24: warning:
 variable 'sgl_size' set but not used [-Wunused-but-set-variable]
  int bcnt, num_posted, sgl_size;
                        ^

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/scsi/lpfc/lpfc_nvme.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Martin K. Petersen Sept. 17, 2018, 7:02 a.m. UTC | #1
YueHaibing,

> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/scsi/lpfc/lpfc_nvme.c: In function 'lpfc_new_nvme_buf':
> drivers/scsi/lpfc/lpfc_nvme.c:2238:24: warning:
>  variable 'sgl_size' set but not used [-Wunused-but-set-variable]
>   int bcnt, num_posted, sgl_size;
>                         ^

Applied to 4.20/scsi-queue, thanks!
diff mbox series

Patch

diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index 5438732..d86eb51 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -2235,13 +2235,11 @@ 
 	struct sli4_sge *sgl;
 	dma_addr_t pdma_phys_sgl;
 	uint16_t iotag, lxri = 0;
-	int bcnt, num_posted, sgl_size;
+	int bcnt, num_posted;
 	LIST_HEAD(prep_nblist);
 	LIST_HEAD(post_nblist);
 	LIST_HEAD(nvme_nblist);
 
-	sgl_size = phba->cfg_sg_dma_buf_size;
-
 	for (bcnt = 0; bcnt < num_to_alloc; bcnt++) {
 		lpfc_ncmd = kzalloc(sizeof(struct lpfc_nvme_buf), GFP_KERNEL);
 		if (!lpfc_ncmd)