From patchwork Wed Oct 16 01:39:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zeng Heng X-Patchwork-Id: 13837607 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 86151D20688 for ; Wed, 16 Oct 2024 01:27:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=7SwfQeBSx+uB8HDFpT6mJlNqIu1VBOuLNDrp3K6UG9g=; b=cme/LouGOhZpgW+ArflgFn/HBh YiMuGwkoymqNl3k1f0zr8swtwfGSESA+N+XVTdJeUDOWml8upa/UM6xOWaqKB1NmbBXcLTjh+ejnf mUq4VcG0W2DjfNdh3ifVZduaRmq8Myp+Q48o0jUR4dp7CBeO5Od5/pGUnPVxJmmqgY4d0/y/J1t4b 9uuFx0N/FCxfXPk4h3A+Pdw+WHUWmR0VXBKIz/Zcll2Wel+2MgU+OFsXPkvdpzb2X7l2gNN2q4kIJ 3padrZDliRgl/aXkonxiGinorIW88Q1xREjnKqeRo3fAWnDgBI3+6v63A2dZVPPw+FiC0DM0mWqI+ byo6KlbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t0sob-0000000A8GH-2yO3; Wed, 16 Oct 2024 01:27:05 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t0snA-0000000A7w8-1tJT for linux-arm-kernel@lists.infradead.org; Wed, 16 Oct 2024 01:25:38 +0000 Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4XStWx4nkLzpX3B; Wed, 16 Oct 2024 09:23:25 +0800 (CST) Received: from kwepemf100008.china.huawei.com (unknown [7.202.181.222]) by mail.maildlp.com (Postfix) with ESMTPS id 22DBC140157; Wed, 16 Oct 2024 09:25:24 +0800 (CST) Received: from huawei.com (10.175.103.91) by kwepemf100008.china.huawei.com (7.202.181.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 16 Oct 2024 09:25:23 +0800 From: Zeng Heng To: , , CC: , , Subject: [PATCH] firmware: ti_sci: Fix compilation failure when CONFIG_TI_SCI_PROTOCOL=m Date: Wed, 16 Oct 2024 09:39:22 +0800 Message-ID: <20241016013922.1392290-1-zengheng4@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemf100008.china.huawei.com (7.202.181.222) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241015_182536_777708_014E7834 X-CRM114-Status: GOOD ( 12.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When build with CONFIG_TI_SCI_PROTOCOL=m && CONFIG_TI_K3_M4_REMOTEPROC=y, compilation tool chain would throw the following error message: arm-linux-gnueabi-ld: drivers/remoteproc/ti_k3_m4_remoteproc.o: in function `k3_m4_rproc_probe': ti_k3_m4_remoteproc.c:(.text+0xc24): undefined reference to `devm_ti_sci_get_by_phandle' This is because devm_ti_sci_get_by_phandle() is compiled into the driver module rather than compiled into kernel, it causes compilation couldn't find the reference of devm_ti_sci_get_by_phandle() when tool chain tries to link ti_k3_m4_remoteproc.o into kernel image. Replace IS_ENABLED with IS_REACHABLE to fix the problem. Reported-by: kernel test robot Closes: https://lore.kernel.org/all/202410150837.FOGlkGvW-lkp@intel.com/ Fixes: aa276781a64a ("firmware: Add basic support for TI System Control Interface (TI-SCI) protocol") Signed-off-by: Zeng Heng --- include/linux/soc/ti/ti_sci_protocol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/soc/ti/ti_sci_protocol.h b/include/linux/soc/ti/ti_sci_protocol.h index bd0d11af76c5..cd44ee7f294b 100644 --- a/include/linux/soc/ti/ti_sci_protocol.h +++ b/include/linux/soc/ti/ti_sci_protocol.h @@ -572,7 +572,7 @@ struct ti_sci_resource { struct ti_sci_resource_desc *desc; }; -#if IS_ENABLED(CONFIG_TI_SCI_PROTOCOL) +#if IS_REACHABLE(CONFIG_TI_SCI_PROTOCOL) const struct ti_sci_handle *ti_sci_get_handle(struct device *dev); int ti_sci_put_handle(const struct ti_sci_handle *handle); const struct ti_sci_handle *devm_ti_sci_get_handle(struct device *dev);