diff mbox series

fpga: m10bmc-sec: Fix undefined reference error in m10bmc_sec_remove()

Message ID 20221112093446.61726-1-zhangqilong3@huawei.com (mailing list archive)
State New
Headers show
Series fpga: m10bmc-sec: Fix undefined reference error in m10bmc_sec_remove() | expand

Commit Message

Zhang Qilong Nov. 12, 2022, 9:34 a.m. UTC
Building with CONFIG_FW_LOADER=m && CONFIG_FW_UPLOAD=y causes
errors:

ld: drivers/fpga/intel-m10-bmc-sec-update.o: in function `m10bmc_sec_remove':
intel-m10-bmc-sec-update.c:(.text+0x25b): undefined reference to `firmware_upload_unregister'
ld: drivers/fpga/intel-m10-bmc-sec-update.o: in function `m10bmc_sec_probe':
intel-m10-bmc-sec-update.c:(.text+0x3c1): undefined reference to `firmware_upload_register'

When CONFIG_FW_LOADER is configed with module, the firmware_upload_unregister()
could not be seen in m10bmc_sec_remove(), it is controlled by CONFIG_FW_UPLOAD
that it depends CONFIG_FW_LOADER. We fix it by adding FW_LOADER in
FPGA_M10_BMC_SEC_UPDATE depends.

Fixes: 5cd339b370e2 ("fpga: m10bmc-sec: add max10 secure update functions")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
---
 drivers/fpga/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Xu Yilun Nov. 14, 2022, 7:57 a.m. UTC | #1
On 2022-11-12 at 17:34:46 +0800, Zhang Qilong wrote:
> Building with CONFIG_FW_LOADER=m && CONFIG_FW_UPLOAD=y causes
> errors:
> 
> ld: drivers/fpga/intel-m10-bmc-sec-update.o: in function `m10bmc_sec_remove':
> intel-m10-bmc-sec-update.c:(.text+0x25b): undefined reference to `firmware_upload_unregister'
> ld: drivers/fpga/intel-m10-bmc-sec-update.o: in function `m10bmc_sec_probe':
> intel-m10-bmc-sec-update.c:(.text+0x3c1): undefined reference to `firmware_upload_register'
> 
> When CONFIG_FW_LOADER is configed with module, the firmware_upload_unregister()
> could not be seen in m10bmc_sec_remove(), it is controlled by CONFIG_FW_UPLOAD
> that it depends CONFIG_FW_LOADER. We fix it by adding FW_LOADER in
> FPGA_M10_BMC_SEC_UPDATE depends.
> 
> Fixes: 5cd339b370e2 ("fpga: m10bmc-sec: add max10 secure update functions")
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>

Thanks for your patch, please check this thread:

https://lore.kernel.org/all/d81630d5-756c-4067-fc1b-47e5f56cad33@infradead.org/

Thanks,
Yilun
diff mbox series

Patch

diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig
index 6c416955da53..cfc684e9be9a 100644
--- a/drivers/fpga/Kconfig
+++ b/drivers/fpga/Kconfig
@@ -246,7 +246,7 @@  config FPGA_MGR_VERSAL_FPGA
 
 config FPGA_M10_BMC_SEC_UPDATE
 	tristate "Intel MAX10 BMC Secure Update driver"
-	depends on MFD_INTEL_M10_BMC && FW_UPLOAD
+	depends on MFD_INTEL_M10_BMC && FW_UPLOAD && FW_LOADER
 	help
 	  Secure update support for the Intel MAX10 board management
 	  controller.