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: 13797565 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 103AFECE587 for ; Mon, 9 Sep 2024 20:32:35 +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-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=BrXbPaCBuH7sNEueoYsvSmVZK4QrL0janj5s3ZqHXKI=; b=U2sKsPT5IWNhC9QDnE+ghN1SlC 1LHlVJc3cyjMDsYikfqa0B/a5We+zVxyg5JF+qvF1QyYTh4zW8g8fKa34Uvw+aQ+v6GAG5FxScJ6t 2lVGvuwHdQI0ZKxgKUbVRe5RDzB/k2gjm3Wp25+YBEg7Qxa2+pGtBUnqj2cO+OlmTLeuS98mdUpM8 VN+vLNEWbCtTfCrCg09tw+C7NBqJoPiX9UedvK0OqXduIuKC5xrl4+P5Ut3o3ANgYVloLx94b224J cOvOEuGFWz0deznk/1+xSv7CGbZbEiNQdFpbcb6Rnfjpij0h0yUb+UezO8FLRTj98iZfHTifRKqpZ jG0TYTrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1snl3e-00000003Ezu-1Ulj; Mon, 09 Sep 2024 20:32:22 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1snl1p-00000003EfG-411i for linux-arm-kernel@lists.infradead.org; Mon, 09 Sep 2024 20:30:31 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id B12A95C05FC; Mon, 9 Sep 2024 20:30:25 +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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240909_133030_086702_498150D6 X-CRM114-Status: UNSURE ( 9.66 ) X-CRM114-Notice: Please train this message. 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 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