[PATCH net-next] net: Remove unused function first_net_device_rcu()

Yue Haibing posted 1 patch 3 months, 2 weeks ago
include/linux/netdevice.h | 7 -------
1 file changed, 7 deletions(-)
[PATCH net-next] net: Remove unused function first_net_device_rcu()
Posted by Yue Haibing 3 months, 2 weeks ago
This is unused since commit f04565ddf52e ("dev: use name hash for
dev_seq_ops")

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
---
 include/linux/netdevice.h | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 03c26bb0fbbe..431d5ca10905 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3316,13 +3316,6 @@ static inline struct net_device *first_net_device(struct net *net)
 		net_device_entry(net->dev_base_head.next);
 }
 
-static inline struct net_device *first_net_device_rcu(struct net *net)
-{
-	struct list_head *lh = rcu_dereference(list_next_rcu(&net->dev_base_head));
-
-	return lh == &net->dev_base_head ? NULL : net_device_entry(lh);
-}
-
 int netdev_boot_setup_check(struct net_device *dev);
 struct net_device *dev_getbyhwaddr(struct net *net, unsigned short type,
 				   const char *hwaddr);
-- 
2.34.1
Re: [PATCH net-next] net: Remove unused function first_net_device_rcu()
Posted by Simon Horman 3 months, 2 weeks ago
On Wed, Jun 25, 2025 at 06:21:55PM +0800, Yue Haibing wrote:
> This is unused since commit f04565ddf52e ("dev: use name hash for
> dev_seq_ops")
> 
> Signed-off-by: Yue Haibing <yuehaibing@huawei.com>

Reviewed-by: Simon Horman <horms@kernel.org>