Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: lpfc: Remove set but not used variable 'sgl_size'

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>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

YueHaibing and committed by
Martin K. Petersen
a63eba9e efcbe998

+1 -3
+1 -3
drivers/scsi/lpfc/lpfc_nvme.c
··· 2235 2235 struct sli4_sge *sgl; 2236 2236 dma_addr_t pdma_phys_sgl; 2237 2237 uint16_t iotag, lxri = 0; 2238 - int bcnt, num_posted, sgl_size; 2238 + int bcnt, num_posted; 2239 2239 LIST_HEAD(prep_nblist); 2240 2240 LIST_HEAD(post_nblist); 2241 2241 LIST_HEAD(nvme_nblist); 2242 - 2243 - sgl_size = phba->cfg_sg_dma_buf_size; 2244 2242 2245 2243 for (bcnt = 0; bcnt < num_to_alloc; bcnt++) { 2246 2244 lpfc_ncmd = kzalloc(sizeof(struct lpfc_nvme_buf), GFP_KERNEL);