mirror of
https://github.com/torvalds/linux.git
synced 2024-12-01 16:41:39 +00:00
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>
This commit is contained in:
parent
14ba87304b
commit
f226f6765f
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user