On Tue, Feb 26, 2019 at 04:03:39PM -0600, Steve Wise wrote: > > On 2/21/2019 6:02 PM, Jason Gunthorpe wrote: > > On Tue, Feb 19, 2019 at 11:08:53AM +0100, Bernard Metzler wrote: > > > >> +static const struct ib_device_ops siw_device_ops = { > >> + .query_device = siw_query_device, > >> + .query_port = siw_query_port, > >> + .get_port_immutable = siw_get_port_immutable, > >> + .get_netdev = siw_get_netdev, > > This driver uses ib_device_set_netdev so get_netdev should not be set. > > > Should ib_device_set_netdev() have a WARN() for this perhaps? It is a good idea.. But ib_device_set_netdev is potentially called before ops is set.. Jason