On Sun, Mar 31, 2019 at 07:10:06PM +0300, Shamir Rabinovitch wrote: > diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c > index cdb6357337c0..d8d81ba054fc 100644 > +++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c > @@ -645,10 +645,15 @@ struct ib_mr *usnic_ib_reg_mr(struct ib_pd *pd, u64 start, u64 length, > int usnic_ib_dereg_mr(struct ib_mr *ibmr, struct ib_udata *udata) > { > struct usnic_ib_mr *mr = to_umr(ibmr); > + struct ib_ucontext *context = udata ? > + container_of( > + udata, > + struct uverbs_attr_bundle, > + driver_udata)->context : NULL; Nothing uses context, just delete it as a parameter to usnic_uiom_reg_release instead of using this wonky container_of cast Jason