All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] RDMA/bnxt_re: Remove set but not used variable 'pg_size'
@ 2020-02-27  6:42 ` YueHaibing
  0 siblings, 0 replies; 12+ messages in thread
From: YueHaibing @ 2020-02-27  6:42 UTC (permalink / raw)
  To: Selvin Xavier, Devesh Sharma, Somnath Kotur,
	Sriharsha Basavapatna, Doug Ledford, Jason Gunthorpe
  Cc: YueHaibing, linux-rdma, kernel-janitors, Hulk Robot

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/infiniband/hw/bnxt_re/qplib_res.c: In function '__alloc_pbl':
drivers/infiniband/hw/bnxt_re/qplib_res.c:109:13: warning:
 variable 'pg_size' set but not used [-Wunused-but-set-variable]

commit 0c4dcd602817 ("RDMA/bnxt_re: Refactor hardware queue memory allocation")
involved this, but not used, so remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/infiniband/hw/bnxt_re/qplib_res.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/bnxt_re/qplib_res.c b/drivers/infiniband/hw/bnxt_re/qplib_res.c
index fc5909c7f2e0..cab1adf1fed9 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_res.c
+++ b/drivers/infiniband/hw/bnxt_re/qplib_res.c
@@ -106,13 +106,12 @@ static int __alloc_pbl(struct bnxt_qplib_res *res,
 	struct pci_dev *pdev = res->pdev;
 	struct scatterlist *sghead;
 	bool is_umem = false;
-	u32 pages, pg_size;
+	u32 pages;
 	int i;
 
 	if (sginfo->nopte)
 		return 0;
 	pages = sginfo->npages;
-	pg_size = sginfo->pgsize;
 	sghead = sginfo->sghead;
 	/* page ptr arrays */
 	pbl->pg_arr = vmalloc(pages * sizeof(void *));

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-02-28 16:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-27  6:42 [PATCH -next] RDMA/bnxt_re: Remove set but not used variable 'pg_size' YueHaibing
2020-02-27  6:42 ` YueHaibing
2020-02-27  6:45 ` [PATCH -next] RDMA/bnxt_re: Remove set but not used variable 'dev_attr' YueHaibing
2020-02-27  6:45   ` YueHaibing
2020-02-28 16:43   ` Jason Gunthorpe
2020-02-28 16:43     ` Jason Gunthorpe
2020-02-27  6:49 ` [PATCH -next] RDMA/bnxt_re: Remove set but not used variables 'pg' and 'idx' YueHaibing
2020-02-27  6:49   ` YueHaibing
2020-02-28 16:44   ` Jason Gunthorpe
2020-02-28 16:44     ` Jason Gunthorpe
2020-02-28 16:43 ` [PATCH -next] RDMA/bnxt_re: Remove set but not used variable 'pg_size' Jason Gunthorpe
2020-02-28 16:43   ` Jason Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.