* [PATCH -next] RDMA/bnxt_re: Remove set but not used variable 'dev_attr'
@ 2020-02-27 6:45 YueHaibing
2020-02-28 16:43 ` Jason Gunthorpe
0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2020-02-27 6:45 UTC (permalink / raw)
To: Selvin Xavier, Devesh Sharma, Somnath Kotur,
Sriharsha Basavapatna, Doug Ledford, Jason Gunthorpe
Cc: YueHaibing, linux-rdma, linux-kernel, kernel-janitors, Hulk Robot
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/infiniband/hw/bnxt_re/ib_verbs.c: In function 'bnxt_re_create_gsi_qp':
drivers/infiniband/hw/bnxt_re/ib_verbs.c:1283:30: warning:
variable 'dev_attr' set but not used [-Wunused-but-set-variable]
commit 8dae419f9ec7 ("RDMA/bnxt_re: Refactor queue pair creation code")
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/ib_verbs.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index ad3e524187e3..7e74efd15d6d 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -1280,14 +1280,12 @@ static int bnxt_re_create_shadow_gsi(struct bnxt_re_qp *qp,
static int bnxt_re_create_gsi_qp(struct bnxt_re_qp *qp, struct bnxt_re_pd *pd,
struct ib_qp_init_attr *init_attr)
{
- struct bnxt_qplib_dev_attr *dev_attr;
struct bnxt_re_dev *rdev;
struct bnxt_qplib_qp *qplqp;
int rc = 0;
rdev = qp->rdev;
qplqp = &qp->qplib_qp;
- dev_attr = &rdev->dev_attr;
qplqp->rq_hdr_buf_size = BNXT_QPLIB_MAX_QP1_RQ_HDR_SIZE_V2;
qplqp->sq_hdr_buf_size = BNXT_QPLIB_MAX_QP1_SQ_HDR_SIZE_V2;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] RDMA/bnxt_re: Remove set but not used variable 'dev_attr'
2020-02-27 6:45 [PATCH -next] RDMA/bnxt_re: Remove set but not used variable 'dev_attr' YueHaibing
@ 2020-02-28 16:43 ` Jason Gunthorpe
0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2020-02-28 16:43 UTC (permalink / raw)
To: YueHaibing
Cc: Selvin Xavier, Devesh Sharma, Somnath Kotur,
Sriharsha Basavapatna, Doug Ledford, linux-rdma, linux-kernel,
kernel-janitors, Hulk Robot
On Thu, Feb 27, 2020 at 06:45:42AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/infiniband/hw/bnxt_re/ib_verbs.c: In function 'bnxt_re_create_gsi_qp':
> drivers/infiniband/hw/bnxt_re/ib_verbs.c:1283:30: warning:
> variable 'dev_attr' set but not used [-Wunused-but-set-variable]
>
> commit 8dae419f9ec7 ("RDMA/bnxt_re: Refactor queue pair creation code")
> 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/ib_verbs.c | 2 --
> 1 file changed, 2 deletions(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-28 16:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-27 6:45 [PATCH -next] RDMA/bnxt_re: Remove set but not used variable 'dev_attr' YueHaibing
2020-02-28 16:43 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).