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/ethernet/intel/igb/igb_main.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/ethernet/intel/igb/igb_main.c')
-rw-r--r-- | drivers/net/ethernet/intel/igb/igb_main.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 594604e09f8d..7546109d4980 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c | |||
@@ -137,8 +137,8 @@ static void igb_update_phy_info(unsigned long); | |||
137 | static void igb_watchdog(unsigned long); | 137 | static void igb_watchdog(unsigned long); |
138 | static void igb_watchdog_task(struct work_struct *); | 138 | static void igb_watchdog_task(struct work_struct *); |
139 | static netdev_tx_t igb_xmit_frame(struct sk_buff *skb, struct net_device *); | 139 | static netdev_tx_t igb_xmit_frame(struct sk_buff *skb, struct net_device *); |
140 | static struct rtnl_link_stats64 *igb_get_stats64(struct net_device *dev, | 140 | static void igb_get_stats64(struct net_device *dev, |
141 | struct rtnl_link_stats64 *stats); | 141 | struct rtnl_link_stats64 *stats); |
142 | static int igb_change_mtu(struct net_device *, int); | 142 | static int igb_change_mtu(struct net_device *, int); |
143 | static int igb_set_mac(struct net_device *, void *); | 143 | static int igb_set_mac(struct net_device *, void *); |
144 | static void igb_set_uta(struct igb_adapter *adapter, bool set); | 144 | static void igb_set_uta(struct igb_adapter *adapter, bool set); |
@@ -5404,8 +5404,8 @@ static void igb_reset_task(struct work_struct *work) | |||
5404 | * @netdev: network interface device structure | 5404 | * @netdev: network interface device structure |
5405 | * @stats: rtnl_link_stats64 pointer | 5405 | * @stats: rtnl_link_stats64 pointer |
5406 | **/ | 5406 | **/ |
5407 | static struct rtnl_link_stats64 *igb_get_stats64(struct net_device *netdev, | 5407 | static void igb_get_stats64(struct net_device *netdev, |
5408 | struct rtnl_link_stats64 *stats) | 5408 | struct rtnl_link_stats64 *stats) |
5409 | { | 5409 | { |
5410 | struct igb_adapter *adapter = netdev_priv(netdev); | 5410 | struct igb_adapter *adapter = netdev_priv(netdev); |
5411 | 5411 | ||
@@ -5413,8 +5413,6 @@ static struct rtnl_link_stats64 *igb_get_stats64(struct net_device *netdev, | |||
5413 | igb_update_stats(adapter, &adapter->stats64); | 5413 | igb_update_stats(adapter, &adapter->stats64); |
5414 | memcpy(stats, &adapter->stats64, sizeof(*stats)); | 5414 | memcpy(stats, &adapter->stats64, sizeof(*stats)); |
5415 | spin_unlock(&adapter->stats64_lock); | 5415 | spin_unlock(&adapter->stats64_lock); |
5416 | |||
5417 | return stats; | ||
5418 | } | 5416 | } |
5419 | 5417 | ||
5420 | /** | 5418 | /** |