]> git.baikalelectronics.ru Git - kernel.git/commit
net: core: add devm_netdev_alloc_pcpu_stats
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 29 Oct 2020 17:31:21 +0000 (18:31 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 31 Oct 2020 17:22:49 +0000 (10:22 -0700)
commit540ca2c7a949474e31b854b7592c068f91ce1629
treed2948c4a6e75ba853f699dcb98a64e51517fb1ae
parente444c69827eb792e06cc453219d55805dc36e01f
net: core: add devm_netdev_alloc_pcpu_stats

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 <hkallweit1@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/netdevice.h