mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 07:23:14 +00:00
net: Document that dev_get_stats() returns the given pointer
Document that dev_get_stats() returns the same stats pointer it was given. Remove const qualification from the returned pointer since the caller may do what it likes with that structure. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3cfde79c6c
commit
d77535162e
@ -2130,8 +2130,8 @@ extern void netdev_features_change(struct net_device *dev);
|
|||||||
/* Load a device via the kmod */
|
/* Load a device via the kmod */
|
||||||
extern void dev_load(struct net *net, const char *name);
|
extern void dev_load(struct net *net, const char *name);
|
||||||
extern void dev_mcast_init(void);
|
extern void dev_mcast_init(void);
|
||||||
extern const struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
|
extern struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
|
||||||
struct rtnl_link_stats64 *storage);
|
struct rtnl_link_stats64 *storage);
|
||||||
extern void dev_txq_stats_fold(const struct net_device *dev,
|
extern void dev_txq_stats_fold(const struct net_device *dev,
|
||||||
struct rtnl_link_stats64 *stats);
|
struct rtnl_link_stats64 *stats);
|
||||||
|
|
||||||
|
@ -5323,13 +5323,13 @@ static void netdev_stats_to_stats64(struct rtnl_link_stats64 *stats64,
|
|||||||
* @dev: device to get statistics from
|
* @dev: device to get statistics from
|
||||||
* @storage: place to store stats
|
* @storage: place to store stats
|
||||||
*
|
*
|
||||||
* Get network statistics from device. The device driver may provide
|
* Get network statistics from device. Return @storage.
|
||||||
* its own method by setting dev->netdev_ops->get_stats64 or
|
* The device driver may provide its own method by setting
|
||||||
* dev->netdev_ops->get_stats; otherwise the internal statistics
|
* dev->netdev_ops->get_stats64 or dev->netdev_ops->get_stats;
|
||||||
* structure is used.
|
* otherwise the internal statistics structure is used.
|
||||||
*/
|
*/
|
||||||
const struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
|
struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
|
||||||
struct rtnl_link_stats64 *storage)
|
struct rtnl_link_stats64 *storage)
|
||||||
{
|
{
|
||||||
const struct net_device_ops *ops = dev->netdev_ops;
|
const struct net_device_ops *ops = dev->netdev_ops;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user