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>
This commit is contained in:

committed by
David S. Miller

parent
63c64de7be
commit
bc1f44709c
@@ -1706,11 +1706,9 @@ static inline u64 sxgbe_get_stat64(void __iomem *ioaddr, int reg_lo, int reg_hi)
|
||||
* This function is a driver entry point whenever ifconfig command gets
|
||||
* executed to see device statistics. Statistics are number of
|
||||
* bytes sent or received, errors occurred etc.
|
||||
* Return value:
|
||||
* This function returns various statistical information of device.
|
||||
*/
|
||||
static struct rtnl_link_stats64 *sxgbe_get_stats64(struct net_device *dev,
|
||||
struct rtnl_link_stats64 *stats)
|
||||
static void sxgbe_get_stats64(struct net_device *dev,
|
||||
struct rtnl_link_stats64 *stats)
|
||||
{
|
||||
struct sxgbe_priv_data *priv = netdev_priv(dev);
|
||||
void __iomem *ioaddr = priv->ioaddr;
|
||||
@@ -1761,8 +1759,6 @@ static struct rtnl_link_stats64 *sxgbe_get_stats64(struct net_device *dev,
|
||||
SXGBE_MMC_TXUFLWHI_GBCNT_REG);
|
||||
writel(0, ioaddr + SXGBE_MMC_CTL_REG);
|
||||
spin_unlock(&priv->stats_lock);
|
||||
|
||||
return stats;
|
||||
}
|
||||
|
||||
/* sxgbe_set_features - entry point to set offload features of the device.
|
||||
|
Reference in New Issue
Block a user