This patch set continue the cleanup started with Jason RFC patch. This patch set clean only the ib_xxx creation APIs because those APIs do have ib_udata. The final goal of this cleanup is to remove the dependency in the IB code in the ib_xxx->uobject pointer as step toward shared ib_xxx objects. Separate patch will be sent for the ib_xxx deletion APIs which do not have the ib_udata. For those the solution will have to be different. Changelog: v2: - Jason: Add the ib_ucontext to the attr bundle and make sure rdma_get_ucontext can't fail - Jason: Add helper macro to the the driver's context out of ib_udata - Leon: Un needed tests in mlx4_ib_db_unmap_user Shamir Rabinovitch (3): IB/uverbs: add ib_ucontext to uverbs_attr_bundle sent from ioctl and cmd flows IB/verbs: add helper function rdma_udata_to_drv_context IB/{hw,sw}: remove 'uobject->context' dependency in object creation APIs drivers/infiniband/core/uverbs_cmd.c | 2 +- drivers/infiniband/core/uverbs_ioctl.c | 3 + drivers/infiniband/core/uverbs_main.c | 12 +-- drivers/infiniband/core/uverbs_std_types.c | 37 +++++++++ drivers/infiniband/hw/bnxt_re/ib_verbs.c | 29 +++---- drivers/infiniband/hw/cxgb3/iwch_provider.c | 3 +- drivers/infiniband/hw/cxgb4/qp.c | 10 ++- drivers/infiniband/hw/hns/hns_roce_qp.c | 24 +++--- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 11 ++- drivers/infiniband/hw/mlx4/mr.c | 11 ++- drivers/infiniband/hw/mlx4/qp.c | 81 +++++++++++--------- drivers/infiniband/hw/mlx4/srq.c | 18 +++-- drivers/infiniband/hw/mlx5/qp.c | 57 +++++++++----- drivers/infiniband/hw/mlx5/srq.c | 10 ++- drivers/infiniband/hw/mthca/mthca_provider.c | 33 ++++---- drivers/infiniband/hw/mthca/mthca_qp.c | 14 +++- drivers/infiniband/hw/mthca/mthca_srq.c | 23 ++++-- drivers/infiniband/hw/nes/nes_verbs.c | 11 ++- drivers/infiniband/hw/qedr/verbs.c | 7 +- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 4 +- drivers/infiniband/sw/rdmavt/qp.c | 14 +++- drivers/infiniband/sw/rdmavt/srq.c | 14 +++- drivers/infiniband/sw/rxe/rxe_qp.c | 9 ++- drivers/infiniband/sw/rxe/rxe_verbs.c | 9 ++- include/rdma/ib_verbs.h | 14 ++++ include/rdma/uverbs_ioctl.h | 1 + include/rdma/uverbs_std_types.h | 16 ++-- 27 files changed, 305 insertions(+), 172 deletions(-) -- 2.17.2