RDMA/qedr: remove set but not used variable 'ctx'
authorYueHaibing <yuehaibing@huawei.com>
Sat, 1 Sep 2018 03:53:46 +0000 (03:53 +0000)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 5 Sep 2018 21:55:22 +0000 (15:55 -0600)
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>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/qedr/verbs.c

index 8cc3df24e04e4a481f93e088a6bcdce8acabd6e9..9d4d165014d9c1d3985404e0c99df88eb25f6030 100644 (file)
@@ -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,