[PATCH for-next 2/4] RDMA/hns: Remove redundant parameters from free_srq/qp_wrid()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Wenpeng Liang <liangwenpeng@xxxxxxxxxx>

The redundant parameters "hr_dev" need to be removed from
free_kernel_wrid() and free_srq_wrid().

Signed-off-by: Wenpeng Liang <liangwenpeng@xxxxxxxxxx>
Signed-off-by: Weihang Li <liweihang@xxxxxxxxxx>
---
 drivers/infiniband/hw/hns/hns_roce_qp.c  | 7 +++----
 drivers/infiniband/hw/hns/hns_roce_srq.c | 6 +++---
 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 fb71755..e0b301a 100644
--- a/drivers/infiniband/hw/hns/hns_roce_qp.c
+++ b/drivers/infiniband/hw/hns/hns_roce_qp.c
@@ -842,8 +842,7 @@ static int alloc_kernel_wrid(struct hns_roce_dev *hr_dev,
 	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 @@ static int hns_roce_create_qp_common(struct hns_roce_dev *hr_dev,
 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 3018c98..f40a000 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);
 }
 
-- 
2.8.1




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux