From patchwork Mon Sep 9 20:30:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13797560 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 smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 432E8ECE587 for ; Mon, 9 Sep 2024 20:30:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) id 0D84FC4CEC8; Mon, 9 Sep 2024 20:30:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61727C4CEC5; Mon, 9 Sep 2024 20:30:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725913829; bh=oKfmWm3IfneM0HZc0vrh0zuvBoU1g5YiwFElUI+GMiw=; h=From:To:List-Id:Cc:Subject:Date:From; b=EKcVYR8eVCldZikPrYbPQqXiCSz23NGnT9RFVA3T+jtstgjvhyR50z/Hzed0I50yW WsWkurfl3DDknMNg9NhavYhGQi36fL4SxBBWJo3AczajYphoc9cnjdA78HxugZZRne An7xvI2KrxviWpGfJivU+azBJH1dKLYJJXgU77F1Bb797UXSb02q64bB6p/SeicXjK iDD88B0eKqNgBtR2OQL4Suz/7lu+niYUc8hHqsNx/iLH33NFkMplE3JWamfJHvdiLR idl7yYwMIvFmTbVkYkv9NxRshCGDPXlguQ1knjESCpdythACLVafEbT1jRLfBpMQvq SQdB45UpUp7Xw== From: Arnd Bergmann To: Shawn Guo , Sascha Hauer , Sudeep Holla , Cristian Marussi , Peng Fan List-Id: Cc: soc@kernel.org, Arnd Bergmann , Pengutronix Kernel Team , Fabio Estevam , imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] firmware: imx: remove duplicate scmi_imx_misc_ctrl_get() Date: Mon, 9 Sep 2024 20:30:18 +0000 Message-Id: <20240909203023.1275232-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 From: Arnd Bergmann 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 --- 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) 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