diff options
author | stephen hemminger <stephen@networkplumber.org> | 2017-01-06 22:12:52 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-08 17:51:44 -0500 |
commit | bc1f44709cf27fb2a5766cadafe7e2ad5e9cb221 (patch) | |
tree | 10f4199c962083956bb3f2928e144b20be23ffe7 /drivers/net/loopback.c | |
parent | 63c64de7be1f762b8c6c224f2994cf5769b542ae (diff) |
net: make ndo_get_stats64 a void function
The network device operation for reading statistics is only called
in one place, and it ignores the return value. Having a structure
return value is potentially confusing because some future driver could
incorrectly assume that the return value was used.
Fix all drivers with ndo_get_stats64 to have a void function.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/loopback.c')
-rw-r--r-- | drivers/net/loopback.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index 1e05b7c2d157..30a493936e63 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c | |||
@@ -97,8 +97,8 @@ static netdev_tx_t loopback_xmit(struct sk_buff *skb, | |||
97 | return NETDEV_TX_OK; | 97 | return NETDEV_TX_OK; |
98 | } | 98 | } |
99 | 99 | ||
100 | static struct rtnl_link_stats64 *loopback_get_stats64(struct net_device *dev, | 100 | static void loopback_get_stats64(struct net_device *dev, |
101 | struct rtnl_link_stats64 *stats) | 101 | struct rtnl_link_stats64 *stats) |
102 | { | 102 | { |
103 | u64 bytes = 0; | 103 | u64 bytes = 0; |
104 | u64 packets = 0; | 104 | u64 packets = 0; |
@@ -122,7 +122,6 @@ static struct rtnl_link_stats64 *loopback_get_stats64(struct net_device *dev, | |||
122 | stats->tx_packets = packets; | 122 | stats->tx_packets = packets; |
123 | stats->rx_bytes = bytes; | 123 | stats->rx_bytes = bytes; |
124 | stats->tx_bytes = bytes; | 124 | stats->tx_bytes = bytes; |
125 | return stats; | ||
126 | } | 125 | } |
127 | 126 | ||
128 | static u32 always_on(struct net_device *dev) | 127 | static u32 always_on(struct net_device *dev) |