From: Cristian Marussi <cristian.marussi@arm.com>
To: Peng Fan <peng.fan@nxp.com>
Cc: Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>, Arnd Bergmann <arnd@arndb.de>,
Sudeep Holla <sudeep.holla@arm.com>,
Cristian Marussi <cristian.marussi@arm.com>,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] firmware: imx: Add stub functions for SCMI LMM API
Date: Wed, 20 Aug 2025 14:52:10 +0100 [thread overview]
Message-ID: <aKXTChnYGUgJzCD1@pluto> (raw)
In-Reply-To: <20250807-imx9-sm-v1-2-3489e41a6fda@nxp.com>
On Thu, Aug 07, 2025 at 09:47:43AM +0800, Peng Fan wrote:
> To ensure successful builds when CONFIG_IMX_SCMI_LMM_DRV is not enabled,
> this patch adds static inline stub implementations for the following
> functions:
>
> - scmi_imx_lmm_operation()
> - scmi_imx_lmm_info()
> - scmi_imx_lmm_reset_vector_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: 7242bbf418f0 ("firmware: imx: Add i.MX95 SCMI LMM driver")
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> include/linux/firmware/imx/sm.h | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/include/linux/firmware/imx/sm.h b/include/linux/firmware/imx/sm.h
> index 99c15bbb46aa8329b5aa8e03017e152074cdf492..f2a72177bb37c1d46145a60710e3809641e0f5a2 100644
> --- a/include/linux/firmware/imx/sm.h
> +++ b/include/linux/firmware/imx/sm.h
> @@ -56,7 +56,24 @@ enum scmi_imx_lmm_op {
> #define SCMI_IMX_LMM_OP_FORCEFUL 0
> #define SCMI_IMX_LMM_OP_GRACEFUL BIT(0)
>
> +#if IS_ENABLED(CONFIG_IMX_SCMI_LMM_DRV)
> int scmi_imx_lmm_operation(u32 lmid, enum scmi_imx_lmm_op op, u32 flags);
> int scmi_imx_lmm_info(u32 lmid, struct scmi_imx_lmm_info *info);
> int scmi_imx_lmm_reset_vector_set(u32 lmid, u32 cpuid, u32 flags, u64 vector);
> +#else
> +static inline int scmi_imx_lmm_operation(u32 lmid, enum scmi_imx_lmm_op op, u32 flags)
> +{
> + return -EOPNOTSUPP;
> +}
> +
> +static inline int scmi_imx_lmm_info(u32 lmid, struct scmi_imx_lmm_info *info)
> +{
> + return -EOPNOTSUPP;
> +}
> +
> +static inline int scmi_imx_lmm_reset_vector_set(u32 lmid, u32 cpuid, u32 flags, u64 vector)
> +{
> + return -EOPNOTSUPP;
> +}
> +#endif
> #endif
LGTM.
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Thanks,
Cristian
next prev parent reply other threads:[~2025-08-20 15:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-07 1:47 [PATCH 0/3] firmware: imx: Add stub functions for MISC/CPU/LMM APIs Peng Fan
2025-08-07 1:47 ` [PATCH 1/3] firmware: imx: Add stub functions for SCMI MISC API Peng Fan
2025-08-20 13:50 ` Cristian Marussi
2025-08-20 13:55 ` Arnd Bergmann
2025-08-21 9:56 ` Peng Fan
2025-08-21 8:56 ` Arnd Bergmann
2025-08-22 2:35 ` Peng Fan
2025-08-22 20:07 ` Arnd Bergmann
2025-08-07 1:47 ` [PATCH 2/3] firmware: imx: Add stub functions for SCMI LMM API Peng Fan
2025-08-20 13:52 ` Cristian Marussi [this message]
2025-08-07 1:47 ` [PATCH 3/3] firmware: imx: Add stub functions for SCMI CPU API Peng Fan
2025-08-20 13:53 ` Cristian Marussi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aKXTChnYGUgJzCD1@pluto \
--to=cristian.marussi@arm.com \
--cc=arnd@arndb.de \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=sudeep.holla@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox