[PATCH net-next 2/4] net: core: add devm_netdev_alloc_pcpu_stats

2020-10-29 Thread Heiner Kallweit
We have netdev_alloc_pcpu_stats(), and we have devm_alloc_percpu(). Add a managed version of netdev_alloc_pcpu_stats, e.g. for allocating the per-cpu stats in the probe() callback of a driver. It needs to be a macro for dealing properly with the type argument. Signed-off-by: Heiner Kallweit ---

[PATCH net-next 2/4] net: core: add devm_netdev_alloc_pcpu_stats

2020-10-15 Thread Heiner Kallweit
Add a managed version of netdev_alloc_pcpu_stats, e.g. for allocating the per-cpu stats in the probe() callback of a driver. It needs to be a macro for dealing properly with the type argument. Signed-off-by: Heiner Kallweit --- include/linux/netdevice.h | 15 +++ net/devres.c