Re: [PATCH 1/2] drm/bridge: imx: fix mixed module-builtin object

From: Masahiro Yamada
Date: Sun Jun 04 2023 - 04:38:28 EST


On Sun, Jun 4, 2023 at 1:52 PM Laurent Pinchart
<laurent.pinchart@xxxxxxxxxxxxxxxx> wrote:
>
> Hi Yamada-san,
>
> Thank you for the patch.
>
> On Sun, Jun 04, 2023 at 02:07:46AM +0900, Masahiro Yamada wrote:
> > With CONFIG_DRM_IMX8QM_LDB=m and CONFIG_DRM_IMX8QXP_LDB=y (or vice
> > versa), imx-ldb-helper.o is linked to a module and also to vmlinux
> > even though the expected CFLAGS are different between builtins and
> > modules.
> >
> > This is the same situation as fixed by commit 637a642f5ca5 ("zstd:
> > Fixing mixed module-builtin objects").
> >
> > Turn helpers in imx-ldb-helper.c into inline functions.
>
> Wouldn't it be better to turn it into a module ? It could then be
> built-in for the above configuration, are compiled as a module when all
> its users are module as well.


Yes, two ways to fix it.
inline line functions vs a separate module

I do not have a strong opinion.


I sent v2.
https://lore.kernel.org/lkml/20230604075713.1027261-1-masahiroy@xxxxxxxxxx/T/#t

Please pick a preferred one.








--
Best Regards

Masahiro Yamada