* [PATCH rdma-next] RDMA/qedr: remove set but not used variable 'ctx'
@ 2018-09-01 3:53 YueHaibing
[not found] ` <SN6PR07MB50241FB1FF44E657987475A4900D0@SN6PR07MB5024.namprd07.prod.outlook.com>
2018-09-05 21:56 ` Jason Gunthorpe
0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2018-09-01 3:53 UTC (permalink / raw)
To: Michal Kalderon, Ariel Elior, Doug Ledford, Jason Gunthorpe
Cc: YueHaibing, linux-rdma, linux-kernel, kernel-janitors
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/infiniband/hw/qedr/verbs.c: In function 'qedr_create_srq':
drivers/infiniband/hw/qedr/verbs.c:1450:24: warning:
variable 'ctx' set but not used [-Wunused-but-set-variable]
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/infiniband/hw/qedr/verbs.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
index 8cc3df2..9d4d165 100644
--- a/drivers/infiniband/hw/qedr/verbs.c
+++ b/drivers/infiniband/hw/qedr/verbs.c
@@ -1447,7 +1447,6 @@ struct ib_srq *qedr_create_srq(struct ib_pd *ibpd,
u64 pbl_base_addr, phy_prod_pair_addr;
struct ib_ucontext *ib_ctx = NULL;
struct qedr_srq_hwq_info *hw_srq;
- struct qedr_ucontext *ctx = NULL;
u32 page_cnt, page_size;
struct qedr_srq *srq;
int rc = 0;
@@ -1473,7 +1472,6 @@ struct ib_srq *qedr_create_srq(struct ib_pd *ibpd,
if (udata && ibpd->uobject && ibpd->uobject->context) {
ib_ctx = ibpd->uobject->context;
- ctx = get_qedr_ucontext(ib_ctx);
if (ib_copy_from_udata(&ureq, udata, sizeof(ureq))) {
DP_ERR(dev,
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH rdma-next] RDMA/qedr: remove set but not used variable 'ctx'
[not found] ` <SN6PR07MB50241FB1FF44E657987475A4900D0@SN6PR07MB5024.namprd07.prod.outlook.com>
@ 2018-09-03 9:22 ` Verma, Rahul
0 siblings, 0 replies; 3+ messages in thread
From: Verma, Rahul @ 2018-09-03 9:22 UTC (permalink / raw)
To: YueHaibing, Kalderon, Michal, Elior, Ariel, Doug Ledford,
Jason Gunthorpe
Cc: linux-rdma, linux-kernel, kernel-janitors
> -----Original Message-----
> From: YueHaibing <yuehaibing@huawei.com>
> Sent: Saturday, September 1, 2018 6:54 AM
> To: Kalderon, Michal <Michal.Kalderon@cavium.com>; Elior, Ariel
> <Ariel.Elior@cavium.com>; Doug Ledford <dledford@redhat.com>; Jason
> Gunthorpe <jgg@ziepe.ca>
> Cc: YueHaibing <yuehaibing@huawei.com>; linux-rdma@vger.kernel.org;
> linux-kernel@vger.kernel.org; kernel-janitors@vger.kernel.org
> Subject: [PATCH rdma-next] RDMA/qedr: remove set but not used variable
> 'ctx'
>
> External Email
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/infiniband/hw/qedr/verbs.c: In function 'qedr_create_srq':
> drivers/infiniband/hw/qedr/verbs.c:1450:24: warning:
> variable 'ctx' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/infiniband/hw/qedr/verbs.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/infiniband/hw/qedr/verbs.c
> b/drivers/infiniband/hw/qedr/verbs.c
> index 8cc3df2..9d4d165 100644
> --- a/drivers/infiniband/hw/qedr/verbs.c
> +++ b/drivers/infiniband/hw/qedr/verbs.c
> @@ -1447,7 +1447,6 @@ struct ib_srq *qedr_create_srq(struct ib_pd
> *ibpd,
> u64 pbl_base_addr, phy_prod_pair_addr;
> struct ib_ucontext *ib_ctx = NULL;
> struct qedr_srq_hwq_info *hw_srq;
> - struct qedr_ucontext *ctx = NULL;
> u32 page_cnt, page_size;
> struct qedr_srq *srq;
> int rc = 0;
> @@ -1473,7 +1472,6 @@ struct ib_srq *qedr_create_srq(struct ib_pd
> *ibpd,
>
> if (udata && ibpd->uobject && ibpd->uobject->context) {
> ib_ctx = ibpd->uobject->context;
> - ctx = get_qedr_ucontext(ib_ctx);
>
> if (ib_copy_from_udata(&ureq, udata, sizeof(ureq))) {
> DP_ERR(dev,
Thank Yue.
Acked-by: Rahul Verma <rahul.verma@cavium.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH rdma-next] RDMA/qedr: remove set but not used variable 'ctx'
2018-09-01 3:53 [PATCH rdma-next] RDMA/qedr: remove set but not used variable 'ctx' YueHaibing
[not found] ` <SN6PR07MB50241FB1FF44E657987475A4900D0@SN6PR07MB5024.namprd07.prod.outlook.com>
@ 2018-09-05 21:56 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2018-09-05 21:56 UTC (permalink / raw)
To: YueHaibing
Cc: Michal Kalderon, Ariel Elior, Doug Ledford, linux-rdma,
linux-kernel, kernel-janitors
On Sat, Sep 01, 2018 at 03:53:46AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/infiniband/hw/qedr/verbs.c: In function 'qedr_create_srq':
> drivers/infiniband/hw/qedr/verbs.c:1450:24: warning:
> variable 'ctx' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> Acked-by: Rahul Verma <rahul.verma@cavium.com>
> ---
> drivers/infiniband/hw/qedr/verbs.c | 2 --
> 1 file changed, 2 deletions(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-09-05 21:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-01 3:53 [PATCH rdma-next] RDMA/qedr: remove set but not used variable 'ctx' YueHaibing
[not found] ` <SN6PR07MB50241FB1FF44E657987475A4900D0@SN6PR07MB5024.namprd07.prod.outlook.com>
2018-09-03 9:22 ` Verma, Rahul
2018-09-05 21:56 ` 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).