On Mon, Jan 28, 2019 at 06:32:41PM +0000, Saleem, Shiraz wrote: > >Subject: [PATCH rdma-next 2/3] RDMA: Handle PD allocations by IB/core > > > >From: Leon Romanovsky <leonro@xxxxxxxxxxxx> > > > >The PD allocations in IB/core allows us to massively simplify drivers > >and their error flows in their .alloc_pd() paths. The changes in > >.alloc_pd() got hand in had with relevant update in .dealloc_pd(). > > > >We will use this opportunity and convert .dealloc_pd() to don't fail, > >as it was suggested a long time ago. > > > >Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> > >--- > > [...] > > >-static struct ib_pd *i40iw_alloc_pd(struct ib_device *ibdev, > >- struct ib_ucontext *context, > >- struct ib_udata *udata) > >+static int i40iw_alloc_pd(struct ib_pd *pd, struct ib_ucontext *context, > >+ struct ib_udata *udata) > > { > >- struct i40iw_pd *iwpd; > >- struct i40iw_device *iwdev = to_iwdev(ibdev); > >+ struct i40iw_pd *iwpd = container_of(pd, struct i40iw_pd, ibpd); > > Nit: use to_iwpd(pd); I'll do > > >+ struct i40iw_device *iwdev = to_iwdev(pd->device); > > struct i40iw_sc_dev *dev = &iwdev->sc_dev; > > struct i40iw_alloc_pd_resp uresp; > > struct i40iw_sc_pd *sc_pd; >
Attachment:
signature.asc
Description: PGP signature