From patchwork Tue Jan 17 16:41:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13104871 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 4913EC3DA78 for ; Tue, 17 Jan 2023 16:42:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Qzef6h2qDkVz4GKmumI87yt3aS6ROf4nzxc0Q4FTLnk=; b=e+p/XeOPFZ/kbg fNpFLlTH/mnSsUd3kkQQ/5InJ+Z9KZ0HpRz19cTPEtalQauLdwtQUZFvxjxh+6+WqkHVWZRsXhjel Hq2PsSYlQDGrMHzfF7itcwk//gUjF+4fvGyD+e6zTSqIbxPKM4vIo1CNpXPp+iwd+kTAqGfAA3IE0 Jy7jGe7gh3CR9WxZQSexaRwBhC66AyfE2u/Ia3ChQ7KI/ALAiuzmIY/Ekm2j3uilSqWDnBcE/T5K9 Q9NWZCxueSxBE62bDas4ITBzdF13IkmjzAUQnuAjsbo7VAAex+LVQGG8iKPpWgf1nrDjx/KKUkHTk HPB46aeXAU+l7uCImq6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHp1o-00F87d-WF; Tue, 17 Jan 2023 16:41:41 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHp1m-00F872-K0 for linux-arm-kernel@lists.infradead.org; Tue, 17 Jan 2023 16:41:39 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F3F1D614C9; Tue, 17 Jan 2023 16:41:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5936DC433D2; Tue, 17 Jan 2023 16:41:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673973697; bh=4W+LMFIC03txs/fKwZg/VXFgERl+Imhhl+f5HQP4HXY=; h=From:To:List-Id:Cc:Subject:Date:From; b=GC5peznF5O+OoIOSc7hqyT7AnK+Ru0U4LriVxu+EtZx5RfEEcmnYnQ7ilNe1FJ2fW 43N9y8LJ8pXAYM0dkZBjpOIXs95UrlKge20qLEPEAF8YUzTlxH+Mh+2Xgj1GCRCPNW 13Rr3SVvcjmOQYoYvMPGEryhhg+FvpSP64iaZyHXp2oUYWJrM1nRtLIYIAv/0AcIsS cXIlxd8P5rTIUdSLusyZ4AVV2W+FZvuto7GOeSSeECnQ7AMo25MaqH6+WmQ49B3YFq qx4X3AZVuMEq1XHu3EEatNKbrHlLTjkt3vtbc62zZ9klErkQH671LfFwCGp5Krk+Z4 fdobWNJLlJiOw== From: Arnd Bergmann To: Michal Simek Cc: soc@kernel.org, Arnd Bergmann , Tanmay Shah , Mathieu Poirier , Ben Levinsky , Ronak Jain , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] firmware: zynqmp: fix declarations for gcc-13 Date: Tue, 17 Jan 2023 17:41:14 +0100 Message-Id: <20230117164133.1245749-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230117_084138_757940_08C20A8F X-CRM114-Status: GOOD ( 12.99 ) 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 gcc-13.0.1 reports a type mismatch for two functions: drivers/firmware/xilinx/zynqmp.c:1228:5: error: conflicting types for 'zynqmp_pm_set_rpu_mode' due to enum/integer mismatch; have 'int(u32, enum rpu_oper_mode)' {aka 'int(unsigned int, enum rpu_oper_mode)'} [-Werror=enum-int-mismatch] 1228 | int zynqmp_pm_set_rpu_mode(u32 node_id, enum rpu_oper_mode rpu_mode) | ^~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/firmware/xilinx/zynqmp.c:25: include/linux/firmware/xlnx-zynqmp.h:552:5: note: previous declaration of 'zynqmp_pm_set_rpu_mode' with type 'int(u32, u32)' {aka 'int(unsigned int, unsigned int)'} 552 | int zynqmp_pm_set_rpu_mode(u32 node_id, u32 arg1); | ^~~~~~~~~~~~~~~~~~~~~~ drivers/firmware/xilinx/zynqmp.c:1246:5: error: conflicting types for 'zynqmp_pm_set_tcm_config' due to enum/integer mismatch; have 'int(u32, enum rpu_tcm_comb)' {aka 'int(unsigned int, enum rpu_tcm_comb)'} [-Werror=enum-int-mismatch] 1246 | int zynqmp_pm_set_tcm_config(u32 node_id, enum rpu_tcm_comb tcm_mode) | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/firmware/xlnx-zynqmp.h:553:5: note: previous declaration of 'zynqmp_pm_set_tcm_config' with type 'int(u32, u32)' {aka 'int(unsigned int, unsigned int)'} 553 | int zynqmp_pm_set_tcm_config(u32 node_id, u32 arg1); | ^~~~~~~~~~~~~~~~~~~~~~~~ Change the declaration in the header to match the function definition. Signed-off-by: Arnd Bergmann Acked-by: Michal Simek --- include/linux/firmware/xlnx-zynqmp.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h index eb88b4ba62f9..0e4c70987e6a 100644 --- a/include/linux/firmware/xlnx-zynqmp.h +++ b/include/linux/firmware/xlnx-zynqmp.h @@ -549,8 +549,8 @@ int zynqmp_pm_request_wake(const u32 node, const u64 address, const enum zynqmp_pm_request_ack ack); int zynqmp_pm_get_rpu_mode(u32 node_id, enum rpu_oper_mode *rpu_mode); -int zynqmp_pm_set_rpu_mode(u32 node_id, u32 arg1); -int zynqmp_pm_set_tcm_config(u32 node_id, u32 arg1); +int zynqmp_pm_set_rpu_mode(u32 node_id, enum rpu_oper_mode rpu_mode); +int zynqmp_pm_set_tcm_config(u32 node_id, enum rpu_tcm_comb tcm_mode); int zynqmp_pm_set_sd_config(u32 node, enum pm_sd_config_type config, u32 value); int zynqmp_pm_set_gem_config(u32 node, enum pm_gem_config_type config, u32 value); @@ -849,12 +849,12 @@ static inline int zynqmp_pm_get_rpu_mode(u32 node_id, enum rpu_oper_mode *rpu_mo return -ENODEV; } -static inline int zynqmp_pm_set_rpu_mode(u32 node_id, u32 arg1) +static inline int zynqmp_pm_set_rpu_mode(u32 node_id, enum rpu_oper_mode rpu_mode) { return -ENODEV; } -static inline int zynqmp_pm_set_tcm_config(u32 node_id, u32 arg1) +static inline int zynqmp_pm_set_tcm_config(u32 node_id, enum rpu_tcm_comb tcm_mode) { return -ENODEV; }