Re: [PATCH] dmaengine: fsl-edma: fix Makefile logic

From: Arnd Bergmann
Date: Thu Jan 11 2024 - 01:25:12 EST


On Thu, Jan 11, 2024, at 01:02, Frank Li wrote:
> On Thu, Jan 11, 2024 at 12:03:42AM +0100, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@xxxxxxxx>
>>
>> A change to remove some unnecessary exports ended up removing some
>> necessary ones as well, and caused a build regression by trying to
>> link a single source file into two separate modules:
>
> You should fix Kconfig to provent fsl-edma and mcf-edma build at the same
> time.

That sounds like the wrong approach since it prevents
compile-testing one of the drivers in an allmodconfig
build.

> EXPORT_SYMBOL_GPL is not necesary at all.
>
> mcf-edma is quit old. ideally, it should be merged into fsl-edma.

I have no specific interest in either of the drivers, just
trying to fix the build regression. I see no harm in exporting
the symbols, but I can refactor the drivers to link all three
files into the same module and add a hack to register both
platform_driver instances from a shared module_init() if
you think that's better. Unfortunately we can't have more
than one initcall in a loadable module.

Arnd