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. Changelog: v3: - Jason: Modify helper rdma_udata_to_drv_context - Jason: Remove helper rdma_get_ucontext - Christoph Hellwig: Leave ib_udata as center of the user/kernel control flow 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/rdma_core.c | 36 ++++++++++ drivers/infiniband/core/umem.c | 10 ++- drivers/infiniband/core/uverbs_cmd.c | 2 +- drivers/infiniband/core/uverbs_ioctl.c | 3 + drivers/infiniband/core/uverbs_main.c | 25 +------ drivers/infiniband/hw/bnxt_re/ib_verbs.c | 24 ++++--- drivers/infiniband/hw/cxgb3/iwch_provider.c | 4 +- drivers/infiniband/hw/cxgb4/qp.c | 10 +-- drivers/infiniband/hw/hns/hns_roce_qp.c | 22 +++--- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 11 +-- drivers/infiniband/hw/mlx4/mr.c | 11 ++- drivers/infiniband/hw/mlx4/qp.c | 74 +++++++++++--------- drivers/infiniband/hw/mlx4/srq.c | 10 ++- drivers/infiniband/hw/mlx5/qp.c | 54 ++++++++------ drivers/infiniband/hw/mlx5/srq.c | 9 +-- drivers/infiniband/hw/mthca/mthca_provider.c | 23 +++--- drivers/infiniband/hw/mthca/mthca_qp.c | 14 ++-- drivers/infiniband/hw/mthca/mthca_srq.c | 23 +++--- drivers/infiniband/hw/nes/nes_verbs.c | 14 ++-- drivers/infiniband/hw/qedr/verbs.c | 7 +- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 6 +- drivers/infiniband/sw/rdmavt/qp.c | 10 ++- drivers/infiniband/sw/rdmavt/srq.c | 10 ++- drivers/infiniband/sw/rxe/rxe_qp.c | 8 ++- drivers/infiniband/sw/rxe/rxe_verbs.c | 6 +- include/rdma/ib_verbs.h | 16 ++++- include/rdma/uverbs_ioctl.h | 1 + include/rdma/uverbs_std_types.h | 18 +++-- 28 files changed, 285 insertions(+), 176 deletions(-) -- 2.17.2