From: Veaceslav Falico <vfalico@gmail.com>
To: Tom Gundersen <teg@jklm.no>
Cc: netdev <netdev@vger.kernel.org>, "David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net-next 1/2] net: use dev->name in netdev_pr* when it's available
Date: Thu, 17 Jul 2014 16:01:58 +0200 [thread overview]
Message-ID: <20140717140158.GA28357@mikrodark.usersys.redhat.com> (raw)
In-Reply-To: <CAG-2HqXhU5RHkMOyj9H2CboYJ1LNFnXzXC_QaAML8P1tihmahg@mail.gmail.com>
On Thu, Jul 17, 2014 at 03:48:45PM +0200, Tom Gundersen wrote:
>On Thu, Jul 17, 2014 at 1:28 PM, Veaceslav Falico <vfalico@gmail.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.
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
next prev parent reply other threads:[~2014-07-17 14:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-17 11:28 [PATCH net-next 0/2] net: print net_device name/state more often Veaceslav Falico
2014-07-17 11:28 ` [PATCH net-next 1/2] net: use dev->name in netdev_pr* when it's available Veaceslav Falico
2014-07-17 13:48 ` Tom Gundersen
2014-07-17 14:01 ` Veaceslav Falico [this message]
2014-07-17 14:29 ` Tom Gundersen
2014-07-17 14:30 ` Veaceslav Falico
2014-07-17 11:28 ` [PATCH net-next 2/2] net: print net_device reg_state in netdev_* unless it's registered Veaceslav Falico
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140717140158.GA28357@mikrodark.usersys.redhat.com \
--to=vfalico@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=teg@jklm.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).