diff mbox series

[v9,1/2] platform/arm64: build drivers even on non-ARM64 platforms

Message ID 20240624-ucsi-yoga-ec-driver-v9-1-53af411a9bd6@linaro.org (mailing list archive)
State Accepted, archived
Headers show
Series usb: typec: ucsi: enable Lenovo Yoga C630 EC | expand

Commit Message

Dmitry Baryshkov June 24, 2024, 3:08 p.m. UTC
The Kconfig for platforms/arm64 has 'depends on ARM64 || COMPILE_TEST'.
However due to Makefile having just obj-$(CONFIG_ARM64) the subdir will
not be descended for !ARM64 platforms and thus the drivers won't get
built. This breaks modular builds of other driver drivers which depend
on arm64 platform drivers.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fixes: 363c8aea2572 ("platform: Add ARM64 platform directory")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/platform/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ilpo Järvinen June 24, 2024, 4:27 p.m. UTC | #1
On Mon, 24 Jun 2024, Dmitry Baryshkov wrote:

> The Kconfig for platforms/arm64 has 'depends on ARM64 || COMPILE_TEST'.
> However due to Makefile having just obj-$(CONFIG_ARM64) the subdir will
> not be descended for !ARM64 platforms and thus the drivers won't get
> built. This breaks modular builds of other driver drivers which depend
> on arm64 platform drivers.
> 
> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Fixes: 363c8aea2572 ("platform: Add ARM64 platform directory")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  drivers/platform/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/Makefile b/drivers/platform/Makefile
> index fbbe4f77aa5d..837202842a6f 100644
> --- a/drivers/platform/Makefile
> +++ b/drivers/platform/Makefile
> @@ -11,4 +11,4 @@ obj-$(CONFIG_OLPC_EC)		+= olpc/
>  obj-$(CONFIG_GOLDFISH)		+= goldfish/
>  obj-$(CONFIG_CHROME_PLATFORMS)	+= chrome/
>  obj-$(CONFIG_SURFACE_PLATFORMS)	+= surface/
> -obj-$(CONFIG_ARM64)		+= arm64/
> +obj-$(CONFIG_ARM64_PLATFORM_DEVICES)	+= arm64/

I made a second ib tag with this patch.

I'm a bit disappointed that LKP didn't catch this in the patch stage, it 
feels almost as if it never built any of the versions.
Dmitry Baryshkov June 24, 2024, 5:47 p.m. UTC | #2
On Mon, Jun 24, 2024 at 07:27:41PM GMT, Ilpo Järvinen wrote:
> On Mon, 24 Jun 2024, Dmitry Baryshkov wrote:
> 
> > The Kconfig for platforms/arm64 has 'depends on ARM64 || COMPILE_TEST'.
> > However due to Makefile having just obj-$(CONFIG_ARM64) the subdir will
> > not be descended for !ARM64 platforms and thus the drivers won't get
> > built. This breaks modular builds of other driver drivers which depend
> > on arm64 platform drivers.
> > 
> > Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Fixes: 363c8aea2572 ("platform: Add ARM64 platform directory")
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> >  drivers/platform/Makefile | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/platform/Makefile b/drivers/platform/Makefile
> > index fbbe4f77aa5d..837202842a6f 100644
> > --- a/drivers/platform/Makefile
> > +++ b/drivers/platform/Makefile
> > @@ -11,4 +11,4 @@ obj-$(CONFIG_OLPC_EC)		+= olpc/
> >  obj-$(CONFIG_GOLDFISH)		+= goldfish/
> >  obj-$(CONFIG_CHROME_PLATFORMS)	+= chrome/
> >  obj-$(CONFIG_SURFACE_PLATFORMS)	+= surface/
> > -obj-$(CONFIG_ARM64)		+= arm64/
> > +obj-$(CONFIG_ARM64_PLATFORM_DEVICES)	+= arm64/
> 
> I made a second ib tag with this patch.

Thank you!

> I'm a bit disappointed that LKP didn't catch this in the patch stage, it 
> feels almost as if it never built any of the versions.

Yes, I had this feeling for several other patchsets. We started getting
build errors, despite having the patch on the maling list for quite a
while. I've just got the modpost build error for drm/msm driver, for the
patchset that was on the ML for weeks.
diff mbox series

Patch

diff --git a/drivers/platform/Makefile b/drivers/platform/Makefile
index fbbe4f77aa5d..837202842a6f 100644
--- a/drivers/platform/Makefile
+++ b/drivers/platform/Makefile
@@ -11,4 +11,4 @@  obj-$(CONFIG_OLPC_EC)		+= olpc/
 obj-$(CONFIG_GOLDFISH)		+= goldfish/
 obj-$(CONFIG_CHROME_PLATFORMS)	+= chrome/
 obj-$(CONFIG_SURFACE_PLATFORMS)	+= surface/
-obj-$(CONFIG_ARM64)		+= arm64/
+obj-$(CONFIG_ARM64_PLATFORM_DEVICES)	+= arm64/