Skip to content

Commit ffc59e3

Browse files
rleonjgunthorpe
authored andcommitted
RDMA/bnxt_re: Remove unusable nq variable
Remove nq variable from bnxt_re_create_srq() and bnxt_re_destroy_srq() as it generates the following compilation warnings: >> drivers/infiniband/hw/bnxt_re/ib_verbs.c:1777:24: warning: variable 'nq' set but not used [-Wunused-but-set-variable] 1777 | struct bnxt_qplib_nq *nq = NULL; | ^ drivers/infiniband/hw/bnxt_re/ib_verbs.c:1828:24: warning: variable 'nq' set but not used [-Wunused-but-set-variable] 1828 | struct bnxt_qplib_nq *nq = NULL; | ^ 2 warnings generated. Fixes: 6b395d3 ("RDMA/bnxt_re: Fix budget handling of notification queue") Link: https://patch.msgid.link/r/8a4343e217d7d1c0a5a786b785c4ac57cb72a2a0.1744288299.git.leonro@nvidia.com Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202504091055.CzgXnk4C-lkp@intel.com/ Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent 9a0e6f1 commit ffc59e3

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/infiniband/hw/bnxt_re/ib_verbs.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,10 +1774,7 @@ int bnxt_re_destroy_srq(struct ib_srq *ib_srq, struct ib_udata *udata)
17741774
ib_srq);
17751775
struct bnxt_re_dev *rdev = srq->rdev;
17761776
struct bnxt_qplib_srq *qplib_srq = &srq->qplib_srq;
1777-
struct bnxt_qplib_nq *nq = NULL;
17781777

1779-
if (qplib_srq->cq)
1780-
nq = qplib_srq->cq->nq;
17811778
if (rdev->chip_ctx->modes.toggle_bits & BNXT_QPLIB_SRQ_TOGGLE_BIT) {
17821779
free_page((unsigned long)srq->uctx_srq_page);
17831780
hash_del(&srq->hash_entry);
@@ -1825,7 +1822,6 @@ int bnxt_re_create_srq(struct ib_srq *ib_srq,
18251822
struct ib_udata *udata)
18261823
{
18271824
struct bnxt_qplib_dev_attr *dev_attr;
1828-
struct bnxt_qplib_nq *nq = NULL;
18291825
struct bnxt_re_ucontext *uctx;
18301826
struct bnxt_re_dev *rdev;
18311827
struct bnxt_re_srq *srq;
@@ -1871,7 +1867,6 @@ int bnxt_re_create_srq(struct ib_srq *ib_srq,
18711867
srq->qplib_srq.eventq_hw_ring_id = rdev->nqr->nq[0].ring_id;
18721868
srq->qplib_srq.sg_info.pgsize = PAGE_SIZE;
18731869
srq->qplib_srq.sg_info.pgshft = PAGE_SHIFT;
1874-
nq = &rdev->nqr->nq[0];
18751870

18761871
if (udata) {
18771872
rc = bnxt_re_init_user_srq(rdev, pd, srq, udata);

0 commit comments

Comments
 (0)