Re: [PATCH] [v3] dpaa2: avoid linking objects into multiple modules

From: Ioana Ciornei

Date: Tue Mar 31 2026 - 08:56:57 EST


On Mon, Mar 30, 2026 at 04:07:29PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> 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
>
> Change 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.

This paragraph is no longer needed since the change was integrated
already.

>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

With the paragraph above removed:

Tested-by: Ioana Ciornei <ioana.ciornei@xxxxxxx>
Reviewed-by: Ioana Ciornei <ioana.ciornei@xxxxxxx>