Re: [PATCH rdma-next v2] RDMA: Provide safe ib_alloc_device() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Jason




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux