On Wed, Oct 31, 2018 at 02:42:41PM +0200, Shamir Rabinovitch wrote: > Next patch will replace usage of pd->uobject with rdma_is_user_pd > function. As suggested by Jason, some of the code was miss using > the pd->uobject pointer in places it should have not been used and > better alternative exists. Fix this just before we do the replace. > > Signed-off-by: Shamir Rabinovitch <shamir.rabinovitch@xxxxxxxxxx> > --- > drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2 +- > drivers/infiniband/hw/i40iw/i40iw_verbs.c | 42 ++++++++++++++---------------- > drivers/infiniband/hw/mlx4/qp.c | 6 ++--- > drivers/infiniband/hw/mlx5/qp.c | 4 +-- > 4 files changed, 26 insertions(+), 28 deletions(-) > > diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c > index 1028758..9d3178d 100644 > --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c > +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c > @@ -673,28 +673,26 @@ static struct ib_qp *i40iw_create_qp(struct ib_pd *ibpd, > goto error; > } > iwqp->ctx_info.qp_compl_ctx = req.user_compl_ctx; > - if (ibpd->uobject && ibpd->uobject->context) { if (udata) sufficiently guarantees ucontext? > - iwqp->user_mode = 1; > - ucontext = to_ucontext(ibpd->uobject->context); > - [..] > + iwqp->user_mode = 1; > + ucontext = to_ucontext(ibpd->uobject->context); Sorry I am confused. If your intent was to remove pd->uobject usage, why isnt this replaced? Shiraz