On Fri, 22 Feb 2019 12:04:07 -0800, Florian Fainelli wrote:
> On 2/22/19 11:54 AM, Jakub Kicinski wrote:
> > Instead of iterating over all devlink ports add a NDO which
> > will return the devlink instance from the driver.
> > 
> > v2: add the netdev_to_devlink() helper (Michal)
> > 
> > Suggested-by: Jiri Pirko <[email protected]>
> > Signed-off-by: Jakub Kicinski <[email protected]>
> > ---  
> [snip]
> 
> > -   mutex_unlock(&devlink_mutex);
> > +   devlink = netdev_to_devlink(dev);
> > +   if (!devlink || !devlink->ops->info_get)
> > +           return;  
> 
> AFAICT devlink_create() allows one to specify a NULL ops argument (not
> that this makes sense), so probably need to add a check against
> devlink->ops here as well, unless we want to change devlink_create() to
> refuse a NULL ops pointer.

Oh, you're right!  devlink_nl_cmd_reload() seems to be missing that
check as well.  Let me respin quickly.

> Other than that:
> 
> Reviewed-by: Florian Fainelli <[email protected]>

Thanks!

Reply via email to