diff mbox series

[net-next] net: delete __dev_getfirstbyhwtype

Message ID 20201129200550.2433401-1-vladimir.oltean@nxp.com (mailing list archive)
State Accepted
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: delete __dev_getfirstbyhwtype | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 7624 this patch: 7624
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 26 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 8048 this patch: 8048
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Vladimir Oltean Nov. 29, 2020, 8:05 p.m. UTC
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>
---
 include/linux/netdevice.h |  1 -
 net/core/dev.c            | 13 -------------
 2 files changed, 14 deletions(-)

Comments

David Howells Nov. 30, 2020, 9:38 a.m. UTC | #1
Vladimir Oltean <vladimir.oltean@nxp.com> wrote:

> 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>

Fine by me.  I thought it had already been removed.

David
Jakub Kicinski Dec. 1, 2020, 11:41 p.m. UTC | #2
On Mon, 30 Nov 2020 09:38:42 +0000 David Howells wrote:
> Vladimir Oltean <vladimir.oltean@nxp.com> wrote:
> 
> > 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>  
> 
> Fine by me.  I thought it had already been removed.

Applied, thanks!
diff mbox series

Patch

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 08ee2e90c822..7f85c23d52ab 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2815,7 +2815,6 @@  unsigned long netdev_boot_base(const char *prefix, int unit);
 struct net_device *dev_getbyhwaddr_rcu(struct net *net, unsigned short type,
 				       const char *hwaddr);
 struct net_device *dev_getfirstbyhwtype(struct net *net, unsigned short type);
-struct net_device *__dev_getfirstbyhwtype(struct net *net, unsigned short type);
 void dev_add_pack(struct packet_type *pt);
 void dev_remove_pack(struct packet_type *pt);
 void __dev_remove_pack(struct packet_type *pt);
diff --git a/net/core/dev.c b/net/core/dev.c
index 916186e7bc56..78fa284225c6 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1069,19 +1069,6 @@  struct net_device *dev_getbyhwaddr_rcu(struct net *net, unsigned short type,
 }
 EXPORT_SYMBOL(dev_getbyhwaddr_rcu);
 
-struct net_device *__dev_getfirstbyhwtype(struct net *net, unsigned short type)
-{
-	struct net_device *dev;
-
-	ASSERT_RTNL();
-	for_each_netdev(net, dev)
-		if (dev->type == type)
-			return dev;
-
-	return NULL;
-}
-EXPORT_SYMBOL(__dev_getfirstbyhwtype);
-
 struct net_device *dev_getfirstbyhwtype(struct net *net, unsigned short type)
 {
 	struct net_device *dev, *ret = NULL;