[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<PAXPR04MB84598499F93BD1708804B2C4889A2@PAXPR04MB8459.eurprd04.prod.outlook.com>
Date: Tue, 10 Sep 2024 00:17:55 +0000
From: Peng Fan <peng.fan@....com>
To: Arnd Bergmann <arnd@...nel.org>, Shawn Guo <shawnguo@...nel.org>, Sascha
Hauer <s.hauer@...gutronix.de>, Sudeep Holla <sudeep.holla@....com>, Cristian
Marussi <cristian.marussi@....com>
CC: "soc@...nel.org" <soc@...nel.org>, Arnd Bergmann <arnd@...db.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>, Fabio Estevam
<festevam@...il.com>, "imx@...ts.linux.dev" <imx@...ts.linux.dev>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] firmware: imx: remove duplicate scmi_imx_misc_ctrl_get()
Hi Arnd,
> Subject: [PATCH] firmware: imx: remove duplicate
> scmi_imx_misc_ctrl_get()
>
> From: Arnd Bergmann <arnd@...db.de>
>
> These two functions have a stub definition when
> CONFIG_IMX_SCMI_MISC_EXT is not set, which conflict with the global
> definition:
>
> In file included from drivers/firmware/imx/sm-misc.c:6:
> include/linux/firmware/imx/sm.h:30:1: error: expected identifier or '('
> before '{' token
> 30 | {
> | ^
> drivers/firmware/imx/sm-misc.c:26:5: error: redefinition of
> 'scmi_imx_misc_ctrl_get'
> 26 | int scmi_imx_misc_ctrl_get(u32 id, u32 *num, u32 *val)
> | ^~~~~~~~~~~~~~~~~~~~~~
> include/linux/firmware/imx/sm.h:24:19: note: previous definition of
> 'scmi_imx_misc_ctrl_get' with type 'int(u32, u32 *, u32 *)' {aka
> 'int(unsigned int, unsigned int *, unsigned int *)'}
> 24 | static inline int scmi_imx_misc_ctrl_get(u32 id, u32 *num, u32
> *val)
> | ^~~~~~~~~~~~~~~~~~~~~~
>
> There is no real need for the #ifdef, and removing this avoids the build
> failure.
>
> Fixes: 0b4f8a68b292 ("firmware: imx: Add i.MX95 MISC driver")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
> include/linux/firmware/imx/sm.h | 11 -----------
> 1 file changed, 11 deletions(-)
>
> diff --git a/include/linux/firmware/imx/sm.h
> b/include/linux/firmware/imx/sm.h index
> 62a2690e2abd..9b85a3f028d1 100644
> --- a/include/linux/firmware/imx/sm.h
> +++ b/include/linux/firmware/imx/sm.h
> @@ -17,18 +17,7 @@
> #define SCMI_IMX_CTRL_SAI4_MCLK 4 /* WAKE
> SAI4 MCLK */
> #define SCMI_IMX_CTRL_SAI5_MCLK 5 /* WAKE
> SAI5 MCLK */
>
> -#if IS_ENABLED(CONFIG_IMX_SCMI_MISC_EXT)
Thanks for spotting this. But I think this macro
should be replaced with CONFIG_IMX_SCMI_MISC_DRV.
CONFIG_IMX_SCMI_MISC_DRV is the macro to guard the driver.
CONFIG_IMX_SCMI_MISC_EXT is the macro to guard the
scmi protocol.
So just need to use CONFIG_IMX_SCMI_MISC_DRV here should
be ok.
Thanks,
Peng.
> 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
> #endif
> --
> 2.39.2
Powered by blists - more mailing lists