ethernet: octeontx2: avoid linking objects into multiple modules
authorArnd Bergmann <arnd@arndb.de>
Tue, 28 May 2024 15:25:05 +0000 (17:25 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 31 May 2024 00:44:19 +0000 (17:44 -0700)
commit727c94c9539aa8865cdbf6a783da6a6585f1fec2
tree3967d6d1812fefe50d0f4a020433a8ca5c366eaf
parent030fae30f0596ae1502cc7fc2557721617adaa7c
ethernet: octeontx2: avoid linking objects into multiple modules

Each object file contains information about which module it gets linked
into, so linking the same file into multiple modules now causes a warning:

scripts/Makefile.build:254: drivers/net/ethernet/marvell/octeontx2/nic/Makefile: otx2_devlink.o is added to multiple modules: rvu_nicpf rvu_nicvf

Change the way that octeontx2 ethernet is built by moving the common
file into a separate module with exported symbols instead.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://lore.kernel.org/r/20240528152527.2148092-1-arnd@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/octeontx2/nic/Makefile
drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.c