RDMA/hns: Remove unused parameter udata

The old version of ib_umem_get() need these udata as a parameter but now
they are unnecessary.

Fixes: c320e527e1 ("IB: Allow calls to ib_umem_get from kernel ULPs")
Link: https://lore.kernel.org/r/1620807142-39157-2-git-send-email-liweihang@huawei.com
Signed-off-by: Lang Cheng <chenglang@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
Lang Cheng 2021-05-12 16:12:19 +08:00 committed by Jason Gunthorpe
parent c906b86e9c
commit 69e0a42f3f
4 changed files with 5 additions and 8 deletions

View File

@ -234,8 +234,7 @@ static int alloc_cq_db(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq,
udata->outlen >= offsetofend(typeof(*resp), cap_flags)) { udata->outlen >= offsetofend(typeof(*resp), cap_flags)) {
uctx = rdma_udata_to_drv_context(udata, uctx = rdma_udata_to_drv_context(udata,
struct hns_roce_ucontext, ibucontext); struct hns_roce_ucontext, ibucontext);
err = hns_roce_db_map_user(uctx, udata, addr, err = hns_roce_db_map_user(uctx, addr, &hr_cq->db);
&hr_cq->db);
if (err) if (err)
return err; return err;
hr_cq->flags |= HNS_ROCE_CQ_FLAG_RECORD_DB; hr_cq->flags |= HNS_ROCE_CQ_FLAG_RECORD_DB;

View File

@ -8,8 +8,7 @@
#include <rdma/ib_umem.h> #include <rdma/ib_umem.h>
#include "hns_roce_device.h" #include "hns_roce_device.h"
int hns_roce_db_map_user(struct hns_roce_ucontext *context, int hns_roce_db_map_user(struct hns_roce_ucontext *context, unsigned long virt,
struct ib_udata *udata, unsigned long virt,
struct hns_roce_db *db) struct hns_roce_db *db)
{ {
unsigned long page_addr = virt & PAGE_MASK; unsigned long page_addr = virt & PAGE_MASK;

View File

@ -1248,8 +1248,7 @@ int hns_roce_create_cq(struct ib_cq *ib_cq, const struct ib_cq_init_attr *attr,
struct ib_udata *udata); struct ib_udata *udata);
int hns_roce_destroy_cq(struct ib_cq *ib_cq, struct ib_udata *udata); int hns_roce_destroy_cq(struct ib_cq *ib_cq, struct ib_udata *udata);
int hns_roce_db_map_user(struct hns_roce_ucontext *context, int hns_roce_db_map_user(struct hns_roce_ucontext *context, unsigned long virt,
struct ib_udata *udata, unsigned long virt,
struct hns_roce_db *db); struct hns_roce_db *db);
void hns_roce_db_unmap_user(struct hns_roce_ucontext *context, void hns_roce_db_unmap_user(struct hns_roce_ucontext *context,
struct hns_roce_db *db); struct hns_roce_db *db);

View File

@ -826,7 +826,7 @@ static int alloc_qp_db(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp,
if (udata) { if (udata) {
if (user_qp_has_sdb(hr_dev, init_attr, udata, resp, ucmd)) { if (user_qp_has_sdb(hr_dev, init_attr, udata, resp, ucmd)) {
ret = hns_roce_db_map_user(uctx, udata, ucmd->sdb_addr, ret = hns_roce_db_map_user(uctx, ucmd->sdb_addr,
&hr_qp->sdb); &hr_qp->sdb);
if (ret) { if (ret) {
ibdev_err(ibdev, ibdev_err(ibdev,
@ -839,7 +839,7 @@ static int alloc_qp_db(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp,
} }
if (user_qp_has_rdb(hr_dev, init_attr, udata, resp)) { if (user_qp_has_rdb(hr_dev, init_attr, udata, resp)) {
ret = hns_roce_db_map_user(uctx, udata, ucmd->db_addr, ret = hns_roce_db_map_user(uctx, ucmd->db_addr,
&hr_qp->rdb); &hr_qp->rdb);
if (ret) { if (ret) {
ibdev_err(ibdev, ibdev_err(ibdev,