On Mon, Jan 28, 2019 at 10:35:17PM +0000, Jason Gunthorpe wrote: > On Mon, Jan 28, 2019 at 10:07:39PM +0000, Ruhl, Michael J wrote: > > > >-struct ib_device *ib_alloc_device(size_t size); > > >+struct ib_device *_ib_alloc_device(size_t size); > > >+#define ib_alloc_device(drv_struct, member) \ > > > > This precludes being able to use variably sized data structure (ala rdmavt). > > rdmavt is the only one doing this, and maybe it shouldn't.. Ie it's > rvt_alloc_device should probably follow the same pattern here and be > written like: > > #define rvt_alloc_device(drv_struct, member, ports) \ > rvt_init_device(ib_alloc_device(drv_struct, member ## . ## ib_dev), ports) > > Then rvt users get the same safety scheme as everyone else enjoys. > This suggesting looks right to me, I don't want to change all drivers, just because one driver has interesting allocation pattern. Jason, Should I resubmit? Thanks > Jason
Attachment:
signature.asc
Description: PGP signature