Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: delete __dev_getfirstbyhwtype

The last user of the RTNL brother of dev_getfirstbyhwtype (the latter
being synchronized under RCU) has been deleted in commit b4db2b35fc44
("afs: Use core kernel UUID generation").

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Howells <dhowells@redhat.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20201129200550.2433401-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Vladimir Oltean and committed by
Jakub Kicinski
c214550f f7cf335c

-14
-1
include/linux/netdevice.h
··· 2815 2815 struct net_device *dev_getbyhwaddr_rcu(struct net *net, unsigned short type, 2816 2816 const char *hwaddr); 2817 2817 struct net_device *dev_getfirstbyhwtype(struct net *net, unsigned short type); 2818 - struct net_device *__dev_getfirstbyhwtype(struct net *net, unsigned short type); 2819 2818 void dev_add_pack(struct packet_type *pt); 2820 2819 void dev_remove_pack(struct packet_type *pt); 2821 2820 void __dev_remove_pack(struct packet_type *pt);
-13
net/core/dev.c
··· 1069 1069 } 1070 1070 EXPORT_SYMBOL(dev_getbyhwaddr_rcu); 1071 1071 1072 - struct net_device *__dev_getfirstbyhwtype(struct net *net, unsigned short type) 1073 - { 1074 - struct net_device *dev; 1075 - 1076 - ASSERT_RTNL(); 1077 - for_each_netdev(net, dev) 1078 - if (dev->type == type) 1079 - return dev; 1080 - 1081 - return NULL; 1082 - } 1083 - EXPORT_SYMBOL(__dev_getfirstbyhwtype); 1084 - 1085 1072 struct net_device *dev_getfirstbyhwtype(struct net *net, unsigned short type) 1086 1073 { 1087 1074 struct net_device *dev, *ret = NULL;