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 /include/linux/netdevice.h | |
| 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 'include/linux/netdevice.h')
| -rw-r--r-- | include/linux/netdevice.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index ecd78b3c9aba..b14ad9c139d7 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -913,8 +913,8 @@ struct netdev_xdp { | |||
| 913 | * Callback used when the transmitter has not made any progress | 913 | * Callback used when the transmitter has not made any progress |
| 914 | * for dev->watchdog ticks. | 914 | * for dev->watchdog ticks. |
| 915 | * | 915 | * |
| 916 | * struct rtnl_link_stats64* (*ndo_get_stats64)(struct net_device *dev, | 916 | * void (*ndo_get_stats64)(struct net_device *dev, |
| 917 | * struct rtnl_link_stats64 *storage); | 917 | * struct rtnl_link_stats64 *storage); |
| 918 | * struct net_device_stats* (*ndo_get_stats)(struct net_device *dev); | 918 | * struct net_device_stats* (*ndo_get_stats)(struct net_device *dev); |
| 919 | * Called when a user wants to get the network device usage | 919 | * Called when a user wants to get the network device usage |
| 920 | * statistics. Drivers must do one of the following: | 920 | * statistics. Drivers must do one of the following: |
| @@ -1165,8 +1165,8 @@ struct net_device_ops { | |||
| 1165 | struct neigh_parms *); | 1165 | struct neigh_parms *); |
| 1166 | void (*ndo_tx_timeout) (struct net_device *dev); | 1166 | void (*ndo_tx_timeout) (struct net_device *dev); |
| 1167 | 1167 | ||
| 1168 | struct rtnl_link_stats64* (*ndo_get_stats64)(struct net_device *dev, | 1168 | void (*ndo_get_stats64)(struct net_device *dev, |
| 1169 | struct rtnl_link_stats64 *storage); | 1169 | struct rtnl_link_stats64 *storage); |
| 1170 | bool (*ndo_has_offload_stats)(const struct net_device *dev, int attr_id); | 1170 | bool (*ndo_has_offload_stats)(const struct net_device *dev, int attr_id); |
| 1171 | int (*ndo_get_offload_stats)(int attr_id, | 1171 | int (*ndo_get_offload_stats)(int attr_id, |
| 1172 | const struct net_device *dev, | 1172 | const struct net_device *dev, |
