]> git.baikalelectronics.ru Git - kernel.git/commit
net: use dev->name in netdev_pr* when it's available
authorVeaceslav Falico <vfalico@gmail.com>
Thu, 17 Jul 2014 17:46:09 +0000 (19:46 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Jul 2014 03:38:42 +0000 (20:38 -0700)
commit3073729069f481728a913a2960f86d94d86cd6bd
tree2b8a21dfe3c0af6c2a879b78d01ef6e6f024f7b3
parente189585712728d4eb3623b45befb0382fd586ad1
net: use dev->name in netdev_pr* when it's available

netdev_name() 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.

There are two cases when there's no real name - when it's an empty string
or when the name is in form of "eth%d", then netdev_name() returns "unnamed
net_device".

CC: "David S. Miller" <davem@davemloft.net>
CC: Tom Gundersen <teg@jklm.no>
Signed-off-by: Veaceslav Falico <vfalico@gmail.com>
Acked-by: Tom Gundersen <teg@jklm.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h