diff mbox series

[-next] firmware: arm_scmi: Fix the build when CONFIG_MAILBOX is not selected

Message ID 20210603072631.1660963-1-sudeep.holla@arm.com (mailing list archive)
State New, archived
Headers show
Series [-next] firmware: arm_scmi: Fix the build when CONFIG_MAILBOX is not selected | expand

Commit Message

Sudeep Holla June 3, 2021, 7:26 a.m. UTC
0day CI kernel test robot reported following build error with randconfig

aarch64-linux-ld: drivers/firmware/arm_scmi/driver.o:(.rodata+0x1e0):
		undefined reference to `scmi_mailbox_desc'

Fix the error by adding CONFIG_MAILBOX dependency for scmi_mailbox_desc.

Cc: Etienne Carriere <etienne.carriere@linaro.org>
Cc: Cristian Marussi <cristian.marussi@arm.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/firmware/arm_scmi/driver.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Cristian Marussi June 3, 2021, 12:55 p.m. UTC | #1
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Cristian Marussi <cristian.marussi@arm.com>

Cristian

On Thu, Jun 03, 2021 at 08:26:31AM +0100, Sudeep Holla wrote:
> 0day CI kernel test robot reported following build error with randconfig
> 
> aarch64-linux-ld: drivers/firmware/arm_scmi/driver.o:(.rodata+0x1e0):
> 		undefined reference to `scmi_mailbox_desc'
> 
> Fix the error by adding CONFIG_MAILBOX dependency for scmi_mailbox_desc.
> 
> Cc: Etienne Carriere <etienne.carriere@linaro.org>
> Cc: Cristian Marussi <cristian.marussi@arm.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  drivers/firmware/arm_scmi/driver.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
> index 5e8e9337adc7..ca71568c5c41 100644
> --- a/drivers/firmware/arm_scmi/driver.c
> +++ b/drivers/firmware/arm_scmi/driver.c
> @@ -1571,7 +1571,9 @@ ATTRIBUTE_GROUPS(versions);
>  
>  /* Each compatible listed below must have descriptor associated with it */
>  static const struct of_device_id scmi_of_match[] = {
> +#ifdef CONFIG_MAILBOX
>  	{ .compatible = "arm,scmi", .data = &scmi_mailbox_desc },
> +#endif
>  #ifdef CONFIG_HAVE_ARM_SMCCC_DISCOVERY
>  	{ .compatible = "arm,scmi-smc", .data = &scmi_smc_desc},
>  #endif
> -- 
> 2.25.1
>
Etienne Carriere June 3, 2021, 1:33 p.m. UTC | #2
On Thu, 3 Jun 2021 at 14:55, Cristian Marussi <cristian.marussi@arm.com> wrote:
>
> Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
> Tested-by: Cristian Marussi <cristian.marussi@arm.com>

Likely related to "firmware: arm_scmi: fix deps arm-smccc-discovery
deps in Kconfig"
Thanks for the fix.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

Regards,
Etienne

>
> > aarch64-linux-ld: drivers/firmware/arm_scmi/driver.o:(.rodata+0x1e0):
> >               undefined reference to `scmi_mailbox_desc'
> >
> > Fix the error by adding CONFIG_MAILBOX dependency for scmi_mailbox_desc.
> >
> > Cc: Etienne Carriere <etienne.carriere@linaro.org>
> > Cc: Cristian Marussi <cristian.marussi@arm.com>
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> > ---
> >  drivers/firmware/arm_scmi/driver.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
> > index 5e8e9337adc7..ca71568c5c41 100644
> > --- a/drivers/firmware/arm_scmi/driver.c
> > +++ b/drivers/firmware/arm_scmi/driver.c
> > @@ -1571,7 +1571,9 @@ ATTRIBUTE_GROUPS(versions);
> >
> >  /* Each compatible listed below must have descriptor associated with it */
> >  static const struct of_device_id scmi_of_match[] = {
> > +#ifdef CONFIG_MAILBOX
> >       { .compatible = "arm,scmi", .data = &scmi_mailbox_desc },
> > +#endif
> >  #ifdef CONFIG_HAVE_ARM_SMCCC_DISCOVERY
> >       { .compatible = "arm,scmi-smc", .data = &scmi_smc_desc},
> >  #endif
> > --
> > 2.25.1
> >
Sudeep Holla June 3, 2021, 2:59 p.m. UTC | #3
On Thu, Jun 03, 2021 at 03:33:05PM +0200, Etienne Carriere wrote:
> On Thu, 3 Jun 2021 at 14:55, Cristian Marussi <cristian.marussi@arm.com> wrote:
> >
> > Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
> > Tested-by: Cristian Marussi <cristian.marussi@arm.com>
> 
> Likely related to "firmware: arm_scmi: fix deps arm-smccc-discovery
> deps in Kconfig"
> Thanks for the fix.
> 
> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

Thanks, indeed your patch triggered this but not it's fault though. That's
why though I initially thought of squashing this into your patch, decided
against it as this build fix must have been there once we abstracted
the mailbox transport. Hence I posted it as a separate patch.
Sudeep Holla June 4, 2021, 8:55 a.m. UTC | #4
On Thu, 3 Jun 2021 08:26:31 +0100, Sudeep Holla wrote:
> 0day CI kernel test robot reported following build error with randconfig
> 
> aarch64-linux-ld: drivers/firmware/arm_scmi/driver.o:(.rodata+0x1e0):
> 		undefined reference to `scmi_mailbox_desc'
> 
> Fix the error by adding CONFIG_MAILBOX dependency for scmi_mailbox_desc.

Applied to sudeep.holla/linux (for-next/scmi), thanks!

[1/1] firmware: arm_scmi: Fix the build when CONFIG_MAILBOX is not selected
      https://git.kernel.org/sudeep.holla/c/ab7766b728

--
Regards,
Sudeep
diff mbox series

Patch

diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index 5e8e9337adc7..ca71568c5c41 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -1571,7 +1571,9 @@  ATTRIBUTE_GROUPS(versions);
 
 /* Each compatible listed below must have descriptor associated with it */
 static const struct of_device_id scmi_of_match[] = {
+#ifdef CONFIG_MAILBOX
 	{ .compatible = "arm,scmi", .data = &scmi_mailbox_desc },
+#endif
 #ifdef CONFIG_HAVE_ARM_SMCCC_DISCOVERY
 	{ .compatible = "arm,scmi-smc", .data = &scmi_smc_desc},
 #endif