Re: [PATCH net-next 1/2] net: use dev->name in netdev_pr* when it's available

From
Veaceslav Falico <hidden>
Date
2014-07-17 14:04:57
Reply to
Tom Gundersen, 2014-07-17
On Thu, Jul 17, 2014 at 03:48:45PM +0200, Tom Gundersen wrote:
On Thu, Jul 17, 2014 at 1:28 PM, Veaceslav Falico [off-list ref] wrote:
quoted
e() returns dev->name only when the net_device is in
NETREG_REGISTERED state.

However, dev->name is always populated on creation, so we can easily use
it. The only caveat is that the device still has a name of type "eth%d", in
which case we cannot use this name as it'll change in the nearest future,
thus return "unnamed net_device".
There are also cases when the name is set to emptystring before being
populated with the real name later on. You may want to check for that
too.
Sure, it'd be easy enough.

Out of curiosity - can you point me to where it's an empty string?

I'll send v2 now.

Thank you!
Cheers,

Tom
Thread (7 messages) 7 messages, 2 authors, last reply 2014-07-17
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help