summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/hns
diff options
context:
space:
mode:
authorWenpeng Liang <liangwenpeng@huawei.com>2020-05-22 21:02:57 +0800
committerJason Gunthorpe <jgg@mellanox.com>2020-05-25 14:20:45 -0300
commitf226f6765f7fe435e033da67698565ca876c2b8d (patch)
tree86a9f652c733e3879ef0274f8dd4d764b2e1f21f /drivers/infiniband/hw/hns
parent14ba87304bf98a0a0c069708bb14e92a616420d1 (diff)
RDMA/hns: Remove redundant parameters from free_srq/qp_wrid()
The redundant parameters "hr_dev" need to be removed from free_kernel_wrid() and free_srq_wrid(). Link: https://lore.kernel.org/r/1590152579-32364-3-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com> Signed-off-by: Weihang Li <liweihang@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/hns')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_qp.c7
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_srq.c6
2 files changed, 6 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_qp.c b/drivers/infiniband/hw/hns/hns_roce_qp.c
index 5d294209fb23..a0a47bd66975 100644
--- a/drivers/infiniband/hw/hns/hns_roce_qp.c
+++ b/drivers/infiniband/hw/hns/hns_roce_qp.c
@@ -842,8 +842,7 @@ err_sq:
return ret;
}
-static void free_kernel_wrid(struct hns_roce_dev *hr_dev,
- struct hns_roce_qp *hr_qp)
+static void free_kernel_wrid(struct hns_roce_qp *hr_qp)
{
kfree(hr_qp->rq.wrid);
kfree(hr_qp->sq.wrid);
@@ -996,7 +995,7 @@ err_buf:
err_db:
free_qp_db(hr_dev, hr_qp, udata);
err_wrid:
- free_kernel_wrid(hr_dev, hr_qp);
+ free_kernel_wrid(hr_qp);
return ret;
}
@@ -1010,7 +1009,7 @@ void hns_roce_qp_destroy(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp,
free_qpc(hr_dev, hr_qp);
free_qpn(hr_dev, hr_qp);
free_qp_buf(hr_dev, hr_qp);
- free_kernel_wrid(hr_dev, hr_qp);
+ free_kernel_wrid(hr_qp);
free_qp_db(hr_dev, hr_qp, udata);
kfree(hr_qp);
diff --git a/drivers/infiniband/hw/hns/hns_roce_srq.c b/drivers/infiniband/hw/hns/hns_roce_srq.c
index 3018c981f1d1..f40a000e94ee 100644
--- a/drivers/infiniband/hw/hns/hns_roce_srq.c
+++ b/drivers/infiniband/hw/hns/hns_roce_srq.c
@@ -270,7 +270,7 @@ static int alloc_srq_wrid(struct hns_roce_dev *hr_dev, struct hns_roce_srq *srq)
return 0;
}
-static void free_srq_wrid(struct hns_roce_dev *hr_dev, struct hns_roce_srq *srq)
+static void free_srq_wrid(struct hns_roce_srq *srq)
{
kfree(srq->wrid);
srq->wrid = NULL;
@@ -355,7 +355,7 @@ int hns_roce_create_srq(struct ib_srq *ib_srq,
err_srqc_alloc:
free_srqc(hr_dev, srq);
err_wrid_alloc:
- free_srq_wrid(hr_dev, srq);
+ free_srq_wrid(srq);
err_idx_alloc:
free_srq_idx(hr_dev, srq);
err_buf_alloc:
@@ -370,7 +370,7 @@ void hns_roce_destroy_srq(struct ib_srq *ibsrq, struct ib_udata *udata)
free_srqc(hr_dev, srq);
free_srq_idx(hr_dev, srq);
- free_srq_wrid(hr_dev, srq);
+ free_srq_wrid(srq);
free_srq_buf(hr_dev, srq);
}