]> git.baikalelectronics.ru Git - kernel.git/commit
net: devres: define a separate devres structure for devm_alloc_etherdev()
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Sat, 23 May 2020 13:27:09 +0000 (15:27 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 23 May 2020 23:56:17 +0000 (16:56 -0700)
commit995705efc7e3e3cbcf7ea755f6beea6bba60a709
tree4159a8ce4a8e566442ee3a764d08661aa087ff21
parent6c1396b0552f893e18eb863adab832fc514a38b9
net: devres: define a separate devres structure for devm_alloc_etherdev()

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 <bgolaszewski@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/devres.c