diff options
author | Xi Wang <wangxi11@huawei.com> | 2020-04-13 19:58:07 +0800 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2020-04-22 15:59:54 -0300 |
commit | cc23267aedebd847f86953c67606a3f280fde201 (patch) | |
tree | dcbe0fe42ceab64c18f659050d3faebc9662cfa8 /drivers/infiniband/hw/hns/hns_roce_hw_v1.c | |
parent | 3c873161a0d7d1e11f1ce9cc59f89a009fb65711 (diff) | |
download | linux-next-cc23267aedebd847f86953c67606a3f280fde201.tar.gz |
RDMA/hns: Optimize hns buffer allocation flow
When the value of nbufs is 1, the buffer is in direct mode, which may cause
confusion. So optimizes current codes to make it easier to maintain and
understand.
Link: https://lore.kernel.org/r/1586779091-51410-3-git-send-email-liweihang@huawei.com
Signed-off-by: Xi Wang <wangxi11@huawei.com>
Signed-off-by: Lang Cheng <chenglang@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/hns_roce_hw_v1.c')
-rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c index 5ff028d77be3..4b5490692fbb 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c @@ -3666,7 +3666,7 @@ static void hns_roce_v1_destroy_cq(struct ib_cq *ibcq, struct ib_udata *udata) ib_umem_release(hr_cq->umem); if (!udata) { /* Free the buff of stored cq */ - hns_roce_buf_free(hr_dev, hr_cq->buf.size, &hr_cq->buf); + hns_roce_buf_free(hr_dev, &hr_cq->buf); } } |