01 Jul, 2020
1 commit
-
Make it an explicit counterpart to devm_register_netdev() just like we
do with devm_free_netdev() for better clarity.Signed-off-by: Bartosz Golaszewski
Reviewed-by: Florian Fainelli
Signed-off-by: David S. Miller
24 May, 2020
3 commits
-
Provide devm_register_netdev() - a device resource managed variant
of register_netdev(). This new helper will only work for net_device
structs that are also already managed by devres.Signed-off-by: Bartosz Golaszewski
Signed-off-by: David S. Miller -
Not using a proxy structure to store struct net_device doesn't save
anything in terms of compiled code size or memory usage but significantly
decreases the readability of the code with all the pointer casting.Define struct net_device_devres and use it in devm_alloc_etherdev_mqs().
Signed-off-by: Bartosz Golaszewski
Signed-off-by: David S. Miller -
There's currently only a single devres helper in net/ - devm variant
of alloc_etherdev. Let's move it to net/devres.c with the intention of
assing a second one: devm_register_netdev(). This new routine will need
to know the address of the release function of devm_alloc_etherdev() so
that it can verify (using devres_find()) that the struct net_device
that's being passed to it is also resource managed.Signed-off-by: Bartosz Golaszewski
Signed-off-by: David S. Miller