[PATCH AUTOSEL 5.12 063/102] firmware: arm_scmi: Fix the build when CONFIG_MAILBOX is not selected
From: Sasha Levin
Date: Wed Jul 14 2021 - 15:48:04 EST
From: Sudeep Holla <sudeep.holla@xxxxxxx>
[ Upstream commit ab7766b72855e6a68109b915d071181b93086e29 ]
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.
Link: https://lore.kernel.org/r/20210603072631.1660963-1-sudeep.holla@xxxxxxx
Cc: Etienne Carriere <etienne.carriere@xxxxxxxxxx>
Cc: Cristian Marussi <cristian.marussi@xxxxxxx>
Reviewed-by: Etienne Carriere <etienne.carriere@xxxxxxxxxx>
Reviewed-by: Cristian Marussi <cristian.marussi@xxxxxxx>
Tested-by: Cristian Marussi <cristian.marussi@xxxxxxx>
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Sudeep Holla <sudeep.holla@xxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
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 cacdf1589b10..a309622ea5c1 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -919,7 +919,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.30.2