From patchwork Sat Nov 12 09:34:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Qilong X-Patchwork-Id: 13041115 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0310C43219 for ; Sat, 12 Nov 2022 09:31:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233739AbiKLJ3q (ORCPT ); Sat, 12 Nov 2022 04:29:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230344AbiKLJ3p (ORCPT ); Sat, 12 Nov 2022 04:29:45 -0500 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35B3EDF49 for ; Sat, 12 Nov 2022 01:29:44 -0800 (PST) Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4N8Vdf2v5kz15MWp; Sat, 12 Nov 2022 17:29:26 +0800 (CST) Received: from kwepemm600014.china.huawei.com (7.193.23.54) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 12 Nov 2022 17:29:42 +0800 Received: from huawei.com (10.90.53.225) by kwepemm600014.china.huawei.com (7.193.23.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 12 Nov 2022 17:29:42 +0800 From: Zhang Qilong To: , , , CC: Subject: [PATCH] fpga: m10bmc-sec: Fix undefined reference error in m10bmc_sec_remove() Date: Sat, 12 Nov 2022 17:34:46 +0800 Message-ID: <20221112093446.61726-1-zhangqilong3@huawei.com> X-Mailer: git-send-email 2.26.0.106.g9fadedd MIME-Version: 1.0 X-Originating-IP: [10.90.53.225] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600014.china.huawei.com (7.193.23.54) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-fpga@vger.kernel.org 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 --- drivers/fpga/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.