Re: [PATCH] ethernet: octeontx2: avoid linking objects into multiple modules

From: Arnd Bergmann
Date: Thu May 30 2024 - 14:53:03 EST


On Thu, May 30, 2024, at 19:54, Jacob Keller wrote:
> On 5/28/2024 8:25 AM, 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/marvell/octeontx2/nic/Makefile: otx2_devlink.o is added to multiple modules: rvu_nicpf rvu_nicvf
>>
>
> When I tried to build, I don't see any warnings produced on the current
> net-next with W=1. Is this something new and not yet in net-next tree?
> If not, how do I enable this warning in my local build?

The warning has been around with W=1 for over a year now, it still
shows up here:

make ARCH=arm64 allmodconfig drivers/net/ethernet/marvell/octeontx2/ -skj20
scripts/Makefile.build:236: drivers/net/ethernet/marvell/octeontx2/nic/Makefile: otx2_devlink.o is added to multiple modules: rvu_nicpf rvu_nicvf
scripts/Makefile.build:236: drivers/net/ethernet/marvell/octeontx2/nic/Makefile: otx2_dcbnl.o is added to multiple modules: rvu_nicpf rvu_nicvf


Arnd