aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb/igb_main.c
diff options
context:
space:
mode:
authorstephen hemminger <stephen@networkplumber.org>2017-01-06 22:12:52 -0500
committerDavid S. Miller <davem@davemloft.net>2017-01-08 17:51:44 -0500
commitbc1f44709cf27fb2a5766cadafe7e2ad5e9cb221 (patch)
tree10f4199c962083956bb3f2928e144b20be23ffe7 /drivers/net/ethernet/intel/igb/igb_main.c
parent63c64de7be1f762b8c6c224f2994cf5769b542ae (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.c10
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);
137static void igb_watchdog(unsigned long); 137static void igb_watchdog(unsigned long);
138static void igb_watchdog_task(struct work_struct *); 138static void igb_watchdog_task(struct work_struct *);
139static netdev_tx_t igb_xmit_frame(struct sk_buff *skb, struct net_device *); 139static netdev_tx_t igb_xmit_frame(struct sk_buff *skb, struct net_device *);
140static struct rtnl_link_stats64 *igb_get_stats64(struct net_device *dev, 140static void igb_get_stats64(struct net_device *dev,
141 struct rtnl_link_stats64 *stats); 141 struct rtnl_link_stats64 *stats);
142static int igb_change_mtu(struct net_device *, int); 142static int igb_change_mtu(struct net_device *, int);
143static int igb_set_mac(struct net_device *, void *); 143static int igb_set_mac(struct net_device *, void *);
144static void igb_set_uta(struct igb_adapter *adapter, bool set); 144static 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 **/
5407static struct rtnl_link_stats64 *igb_get_stats64(struct net_device *netdev, 5407static 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/**