Skip to content

Commit d160c66

Browse files
Amit Cohenkuba-moo
authored andcommitted
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 <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent ddb2d2a commit d160c66

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
@@ -3198,7 +3198,7 @@ static inline void unregister_netdevice(struct net_device *dev)
31983198
int netdev_refcnt_read(const struct net_device *dev);
31993199
void free_netdev(struct net_device *dev);
32003200
void netdev_freemem(struct net_device *dev);
3201-
int init_dummy_netdev(struct net_device *dev);
3201+
void init_dummy_netdev(struct net_device *dev);
32023202

32033203
struct net_device *netdev_get_xmit_slave(struct net_device *dev,
32043204
struct sk_buff *skb,

net/core/dev.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10345,7 +10345,7 @@ EXPORT_SYMBOL(register_netdevice);
1034510345
* that need to tie several hardware interfaces to a single NAPI
1034610346
* poll scheduler due to HW limitations.
1034710347
*/
10348-
int init_dummy_netdev(struct net_device *dev)
10348+
void init_dummy_netdev(struct net_device *dev)
1034910349
{
1035010350
/* Clear everything. Note we don't initialize spinlocks
1035110351
* are they aren't supposed to be taken by any of the
@@ -10373,8 +10373,6 @@ int init_dummy_netdev(struct net_device *dev)
1037310373
* because users of this 'device' dont need to change
1037410374
* its refcount.
1037510375
*/
10376-
10377-
return 0;
1037810376
}
1037910377
EXPORT_SYMBOL_GPL(init_dummy_netdev);
1038010378

0 commit comments

Comments
 (0)