From: Leon Romanovsky <[email protected]> There are no ULP callers that use the CQ resize functionality, so remove it.
Signed-off-by: Leon Romanovsky <[email protected]> --- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c index b8516d8b8426..16bb586d68c7 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c @@ -3338,10 +3338,6 @@ int bnxt_re_resize_cq(struct ib_cq *ibcq, int cqe, struct ib_udata *udata) cq = container_of(ibcq, struct bnxt_re_cq, ib_cq); rdev = cq->rdev; dev_attr = rdev->dev_attr; - if (!ibcq->uobject) { - ibdev_err(&rdev->ibdev, "Kernel CQ Resize not supported"); - return -EOPNOTSUPP; - } if (cq->resize_umem) { ibdev_err(&rdev->ibdev, "Resize CQ %#x failed - Busy", @@ -3375,7 +3371,7 @@ int bnxt_re_resize_cq(struct ib_cq *ibcq, int cqe, struct ib_udata *udata) ibdev_err(&rdev->ibdev, "%s: ib_umem_get failed! rc = %pe\n", __func__, cq->resize_umem); cq->resize_umem = NULL; - goto fail; + return rc; } cq->resize_cqe = entries; memcpy(&sg_info, &cq->qplib_cq.sg_info, sizeof(sg_info)); @@ -3399,13 +3395,11 @@ int bnxt_re_resize_cq(struct ib_cq *ibcq, int cqe, struct ib_udata *udata) return 0; fail: - if (cq->resize_umem) { - ib_umem_release(cq->resize_umem); - cq->resize_umem = NULL; - cq->resize_cqe = 0; - memcpy(&cq->qplib_cq.sg_info, &sg_info, sizeof(sg_info)); - cq->qplib_cq.dpi = orig_dpi; - } + ib_umem_release(cq->resize_umem); + cq->resize_umem = NULL; + cq->resize_cqe = 0; + memcpy(&cq->qplib_cq.sg_info, &sg_info, sizeof(sg_info)); + cq->qplib_cq.dpi = orig_dpi; return rc; } -- 2.52.0
