Prepare the code for shared ib_pd model. Having uobject pointer in ib_pd is not correct in shared ib_pd model. In shared ib_pd model, ib_pd can belong to 1 or more uobject. Prior patches removed the dependency in the code for uobject pointer from ib_pd. Now it's good time to complete the work and get rid of the uobject pointer in the ib_pd! Signed-off-by: Shamir Rabinovitch <shamir.rabinovitch@xxxxxxxxxx> --- drivers/infiniband/core/uverbs_cmd.c | 1 - drivers/infiniband/core/verbs.c | 1 - drivers/infiniband/hw/mlx5/main.c | 1 - include/rdma/ib_verbs.h | 1 - 4 files changed, 4 deletions(-) diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 0203c9587502..db50b3fc357f 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -371,7 +371,6 @@ ssize_t ib_uverbs_alloc_pd(struct ib_uverbs_file *file, } pd->device = ib_dev; - pd->uobject = uobj; pd->__internal_mr = NULL; atomic_set(&pd->usecnt, 0); diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index d972f1dbf8fd..174e683ca739 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -248,7 +248,6 @@ struct ib_pd *__ib_alloc_pd(struct ib_device *device, unsigned int flags, return pd; pd->device = device; - pd->uobject = NULL; pd->__internal_mr = NULL; atomic_set(&pd->usecnt, 0); pd->flags = flags; diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 885129678837..31e654f92c59 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -4567,7 +4567,6 @@ static int create_dev_resources(struct mlx5_ib_resources *devr) goto error0; } devr->p0->device = &dev->ib_dev; - devr->p0->uobject = NULL; atomic_set(&devr->p0->usecnt, 0); devr->c0 = mlx5_ib_create_cq(&dev->ib_dev, &cq_attr, NULL, NULL); diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index f88838988f4d..6a3c5b5892f0 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -1566,7 +1566,6 @@ struct ib_pd { u32 local_dma_lkey; u32 flags; struct ib_device *device; - struct ib_uobject *uobject; atomic_t usecnt; /* count all resources */ u32 unsafe_global_rkey; -- 2.17.1