mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 08:31:13 +00:00
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:
parent
63c64de7be
commit
bc1f44709c
82 changed files with 166 additions and 309 deletions
|
@ -106,8 +106,8 @@ static int l2tp_eth_dev_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
static struct rtnl_link_stats64 *l2tp_eth_get_stats64(struct net_device *dev,
|
||||
struct rtnl_link_stats64 *stats)
|
||||
static void l2tp_eth_get_stats64(struct net_device *dev,
|
||||
struct rtnl_link_stats64 *stats)
|
||||
{
|
||||
struct l2tp_eth *priv = netdev_priv(dev);
|
||||
|
||||
|
@ -117,10 +117,8 @@ static struct rtnl_link_stats64 *l2tp_eth_get_stats64(struct net_device *dev,
|
|||
stats->rx_bytes = atomic_long_read(&priv->rx_bytes);
|
||||
stats->rx_packets = atomic_long_read(&priv->rx_packets);
|
||||
stats->rx_errors = atomic_long_read(&priv->rx_errors);
|
||||
return stats;
|
||||
}
|
||||
|
||||
|
||||
static const struct net_device_ops l2tp_eth_netdev_ops = {
|
||||
.ndo_init = l2tp_eth_dev_init,
|
||||
.ndo_uninit = l2tp_eth_dev_uninit,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue