From mboxrd@z Thu Jan 1 00:00:00 1970 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 B41D3CA0EDC for ; Wed, 20 Aug 2025 14:46:32 +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:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=r78qr10wvwZ4tYH1h0vPNr+eXSpGc9JLpns9MKFdimg=; b=2o4juXAHGbGmKk2VUi7e+nspPM TnelKX4Knh8nNGxwUMOuRo7kx155PBEXmEZaLhkBd1a/RKO2PjnIUmMSZj5skTqLwEsW9yExVPMoP wjNsNcysJDSkz0KmYXg8Hzc1mZ4MI/pmP3HKPpgBs9cmAPZhxFTp+5S7fDbQ6hYnv5DQQrHJZjiww PXUsNuR+/jo5h9fk1avwuHr1lyHQ5RHb0ALddk9PASytosB30AHcGNyt3FhVnwOcn8J3NwGvZKlJr Vt8ggW1oN+NE05MXSjKhQmFzVjTMyF7wSSvly8SEwO07lyKlN0mboUMNlK4mJ2wHGGGti+XvpMP+j BMTekvDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uok55-0000000E8hQ-1Tx5; Wed, 20 Aug 2025 14:46:27 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uojD9-0000000Dtun-0g05 for linux-arm-kernel@lists.infradead.org; Wed, 20 Aug 2025 13:50:44 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DE5521D31; Wed, 20 Aug 2025 06:50:33 -0700 (PDT) Received: from pluto (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EC4683F738; Wed, 20 Aug 2025 06:50:39 -0700 (PDT) Date: Wed, 20 Aug 2025 14:50:37 +0100 From: Cristian Marussi To: Peng Fan Cc: Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Arnd Bergmann , Sudeep Holla , Cristian Marussi , imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] firmware: imx: Add stub functions for SCMI MISC API Message-ID: References: <20250807-imx9-sm-v1-0-3489e41a6fda@nxp.com> <20250807-imx9-sm-v1-1-3489e41a6fda@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250807-imx9-sm-v1-1-3489e41a6fda@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250820_065043_235913_29F743EF X-CRM114-Status: GOOD ( 17.20 ) 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 On Thu, Aug 07, 2025 at 09:47:42AM +0800, Peng Fan wrote: > To ensure successful builds when CONFIG_IMX_SCMI_MISC_DRV is not enabled, > this patch adds static inline stub implementations for the following > functions: > > - scmi_imx_misc_ctrl_get() > - scmi_imx_misc_ctrl_set() > > These stubs return -EOPNOTSUPP to indicate that the functionality is not > supported in the current configuration. This avoids potential build or > link errors in code that conditionally calls these functions based on > feature availability. > > Fixes: 540c830212ed ("firmware: imx: remove duplicate scmi_imx_misc_ctrl_get()") > Fixes: 0b4f8a68b292 ("firmware: imx: Add i.MX95 MISC driver") > Signed-off-by: Peng Fan > --- > include/linux/firmware/imx/sm.h | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/include/linux/firmware/imx/sm.h b/include/linux/firmware/imx/sm.h > index d4212bc42b2c17fb8f94d58856a75beb5611ce4b..99c15bbb46aa8329b5aa8e03017e152074cdf492 100644 > --- a/include/linux/firmware/imx/sm.h > +++ b/include/linux/firmware/imx/sm.h > @@ -26,8 +26,20 @@ > #define SCMI_IMX94_CTRL_SAI3_MCLK 5U /*!< WAKE SAI3 MCLK */ > #define SCMI_IMX94_CTRL_SAI4_MCLK 6U /*!< WAKE SAI4 MCLK */ > > +#if IS_ENABLED(CONFIG_IMX_SCMI_MISC_DRV) > int scmi_imx_misc_ctrl_get(u32 id, u32 *num, u32 *val); > int scmi_imx_misc_ctrl_set(u32 id, u32 val); > +#else > +static inline int scmi_imx_misc_ctrl_get(u32 id, u32 *num, u32 *val) > +{ > + return -EOPNOTSUPP; > +} > + > +static inline int scmi_imx_misc_ctrl_set(u32 id, u32 val) > +{ > + return -EOPNOTSUPP; > +} > +#endif LGTM. Reviewed-by: Cristian Marussi Thanks, Cristian