提交 6be2067d 编写于 作者: Y YueHaibing 提交者: Jason Gunthorpe

RDMA/bnxt_re: Remove set but not used variable 'pg_size'

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 0c4dcd60 ("RDMA/bnxt_re: Refactor hardware queue memory
allocation") involved this, but not used, so remove it.

Link: https://lore.kernel.org/r/20200227064209.87893-1-yuehaibing@huawei.comReported-by: NHulk Robot <hulkci@huawei.com>
Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
上级 66832705
......@@ -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 *));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册