lkml.org 
[lkml]   [2023]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V3 2/2] usb: gadget: u_ether: Don't warn in gether_setup_name_default()
On Thu, Jan 19, 2023 at 01:38:15PM +0000, Jon Hunter wrote:
>
> On 19/01/2023 10:46, Greg Kroah-Hartman wrote:
>
> ...
>
> > In looking at this further, you are right, the structures are not
> > initialized properly yet.
> >
> > So move these to a different function entirely, they should be in
> > gether_register_netdev() instead, after the device is registered with
> > the system.
>
>
> I wonder if this is even necessary. Looking at gether_register_netdev() it
> already has ...
>
> status = register_netdev(net);
> if (status < 0) {
> dev_dbg(&g->dev, "register_netdev failed, %d\n", status);
> return status;
> } else {
> INFO(dev, "HOST MAC %pM\n", dev->host_mac);
> INFO(dev, "MAC %pM\n", dev->dev_mac);

Those need to be moved to be dev_info() and then I'll stop complaining :)
Or dev_dbg() if you want to make it debug only.

> ...
> }
>
>
> Any objection to just removing completely from gether_setup_name_default()?

Nope!

Remove them and change the above lines and then all should be good.

thanks,

greg k-h

\
 
 \ /
  Last update: 2023-03-26 23:48    [W:0.029 / U:0.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site