[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAG-2HqXhU5RHkMOyj9H2CboYJ1LNFnXzXC_QaAML8P1tihmahg@mail.gmail.com>
Date: Thu, 17 Jul 2014 15:48:45 +0200
From: Tom Gundersen <teg@...m.no>
To: Veaceslav Falico <vfalico@...il.com>
Cc: netdev <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH net-next 1/2] net: use dev->name in netdev_pr* when it's available
On Thu, Jul 17, 2014 at 1:28 PM, Veaceslav Falico <vfalico@...il.com> wrote:
> 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.
Cheers,
Tom
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists