Re: [PATCH] dpaa: avoid linking objects into multiple modules

From
Simon Horman <hidden>
Date
2023-07-25 20:02:20
Also in
lkml
Reply to
Arnd Bergmann, 2023-07-25
On Tue, Jul 25, 2023 at 08:43:40AM +0200, Arnd Bergmann wrote:
From: Arnd Bergmann <arnd@arndb.de>

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/freescale/dpaa2/Makefile: dpaa2-mac.o is added to multiple modules: fsl-dpaa2-eth fsl-dpaa2-switch
scripts/Makefile.build:254: drivers/net/ethernet/freescale/dpaa2/Makefile: dpmac.o is added to multiple modules: fsl-dpaa2-eth fsl-dpaa2-switch

Chang the way that dpaa2 is built by moving the two common files into a
separate module with exported symbols instead.

To avoid a link failure when the switch driver is built-in, but the dpio driver
is a loadable module, add the same dependency in there that exists for
the ethernet driver.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Hi Arnd,

overall this looks good to me.
One thing that I noticed, and I'm not sure if we care,
is that an x86_64 allmodconfig now reports:

WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ethernet/freescale/dpaa2/fsl-dpaa2-common.o
Thread (4 messages) 4 messages, 4 authors, last reply 2023-07-25
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help