diff mbox series

[4/4] IB/verbs: remove ib_pd uobject pointer

Message ID 20181007081406.9734-5-shamir.rabinovitch@oracle.com (mailing list archive)
State Superseded
Headers show
Series remove ib_pd uobject pointer | expand

Commit Message

Shamir Rabinovitch Oct. 7, 2018, 8:14 a.m. UTC
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@oracle.com>
---
 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 mbox series

Patch

diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index 45bd746f03ff..b2091c3fe2df 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 3766d00ebbfc..071cb753683d 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 5c1591d2eb75..1c4e62362fe2 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -4572,7 +4572,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 718a88216433..7c17fbdc02d2 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -1539,7 +1539,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;