Skip to content

Commit d7a6d4c

Browse files
author
Izabela Bakollari
committed
net: Do not return value from init_dummy_netdev()
JIRA: https://issues.redhat.com/browse/RHEL-59092 commit d160c66 Author: Amit Cohen <amcohen@nvidia.com> Date: Mon Feb 5 12:30:22 2024 +0200 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. Signed-off-by: Amit Cohen <amcohen@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/20240205103022.440946-1-amcohen@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Izabela Bakollari <ibakolla@redhat.com>
1 parent 4d5bda5 commit d7a6d4c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

include/linux/netdevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3177,7 +3177,7 @@ static inline void unregister_netdevice(struct net_device *dev)
31773177
int netdev_refcnt_read(const struct net_device *dev);
31783178
void free_netdev(struct net_device *dev);
31793179
void netdev_freemem(struct net_device *dev);
3180-
int init_dummy_netdev(struct net_device *dev);
3180+
void init_dummy_netdev(struct net_device *dev);
31813181

31823182
struct net_device *netdev_get_xmit_slave(struct net_device *dev,
31833183
struct sk_buff *skb,

net/core/dev.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10159,7 +10159,7 @@ EXPORT_SYMBOL(register_netdevice);
1015910159
* that need to tie several hardware interfaces to a single NAPI
1016010160
* poll scheduler due to HW limitations.
1016110161
*/
10162-
int init_dummy_netdev(struct net_device *dev)
10162+
void init_dummy_netdev(struct net_device *dev)
1016310163
{
1016410164
/* Clear everything. Note we don't initialize spinlocks
1016510165
* are they aren't supposed to be taken by any of the
@@ -10187,8 +10187,6 @@ int init_dummy_netdev(struct net_device *dev)
1018710187
* because users of this 'device' dont need to change
1018810188
* its refcount.
1018910189
*/
10190-
10191-
return 0;
1019210190
}
1019310191
EXPORT_SYMBOL_GPL(init_dummy_netdev);
1019410192

0 commit comments

Comments
 (0)