net: Do not return value from init_dummy_netdev()
Subsystems (2)
PATCH 1/1 net: Do not return value from init_dummy_netdev()
init_dummy_netdev() always returns zero and all the callers do not check the returned value. Set the function to not return value, as it is not really used today.
--- include/linux/netdevice.h | 2 +- net/core/dev.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-)
include/linux/netdevice.h +1 -1
@@ -3161,7 +3161,7 @@ static inline void unregister_netdevice(struct net_device *dev)int netdev_refcnt_read (const struct net_device *dev);void free_netdev (struct net_device *dev);void netdev_freemem (struct net_device *dev); -int init_dummy_netdev (struct net_device *dev); +void init_dummy_netdev (struct net_device *dev); struct net_device *netdev_get_xmit_slave(struct net_device *dev, struct sk_buff *skb,
net/core/dev.c +1 -3
@@ -10294,7 +10294,7 @@ EXPORT_SYMBOL(register_netdevice);* that need to tie several hardware interfaces to a single NAPI * poll scheduler due to HW limitations. */ -int init_dummy_netdev (struct net_device *dev) +void init_dummy_netdev (struct net_device *dev) {/* Clear everything. Note we don't initialize spinlocks * are they aren't supposed to be taken by any of the
@@ -10322,8 +10322,6 @@ int init_dummy_netdev(struct net_device *dev)* because users of this 'device' dont need to change * its refcount. */ - -return 0 ; }EXPORT_SYMBOL_GPL (init_dummy_netdev);
Signature · 1 line
2.43.0
Quoted 7 lines · Amit Cohen
init_dummy_netdev()always returns zero and all the callers do not check the returned value. Set the function to not return value, as it is not really used today.Signed-off-by Amit Cohen <[email protected]>Reviewed-by Ido Schimmel <[email protected]>Reviewed-by Jiri Pirko <[email protected]>
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Mon, 5 Feb 2024 12:30:22 +0200 you wrote:
init_dummy_netdev()always returns zero and all the callers do not check the returned value. Set the function to not return value, as it is not really used today.Signed-off-by Amit Cohen <[email protected]>Reviewed-by Ido Schimmel <[email protected]>Reviewed-by Jiri Pirko <[email protected]>[...]
Here is the summary with links:
- [net-next] net: Do not return value from init_dummy_netdev()
https://git.kernel.org/netdev/net-next/c/d160c66cda0a
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html