net: dsa: move bulk of devlink code to devlink.{c,h}
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 21 Nov 2022 13:55:41 +0000 (15:55 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 23 Nov 2022 04:41:46 +0000 (20:41 -0800)
commit5cf2c75b5b91bcf81d61b2d2ea1c71363bcacf89
tree1bafe3106befdca7f83071c94d45928c29c26509
parentd2be320495b93ffb469e53100ba1668d0cd7eedc
net: dsa: move bulk of devlink code to devlink.{c,h}

dsa.c and dsa2.c are bloated with too much off-topic code. Identify all
code related to devlink and move it to a new devlink.c file.

Steer clear of the dsa_priv.h dumping ground antipattern and create a
dedicated devlink.h for it, which will be included only by the C files
which need it. Usage of dsa_priv.h will be minimized in later patches.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/dsa/Makefile
net/dsa/devlink.c [new file with mode: 0644]
net/dsa/devlink.h [new file with mode: 0644]
net/dsa/dsa.c
net/dsa/dsa2.c