Message ID | 20230417205531.1880657-1-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2404717vqo; Mon, 17 Apr 2023 14:11:41 -0700 (PDT) X-Google-Smtp-Source: AKy350ZwcpC1rP1wh0yK8gkVWH5bcwTtB/RDEEd8yJ3TMjzfnrJv93JRjBHMdg/abSfXq99VUc5z X-Received: by 2002:a17:90b:380c:b0:246:fdcc:f84c with SMTP id mq12-20020a17090b380c00b00246fdccf84cmr15265330pjb.35.1681765900744; Mon, 17 Apr 2023 14:11:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681765900; cv=none; d=google.com; s=arc-20160816; b=RoEdw6n/GvQVBXryyCb/cGQlF4jZAoZbAwzqPMFdnVp6W7CjzbGBE+vWsUoEhYdX8f ku6K/eaaK1EAvSdyIr6FAPnC8Q4f//aKMhg8xhFZuF3+xGsGig2Z85hfTu7YT0TgVL9S LYwUmWyDTgV/GKql9oRMfooOCKT/gMqCQMwvzJ+LHQiMvcUBowDK+uTaz2NsoXtzLAFC DE9Rxrp4Ew2vXc19Jv28RFX9nPiRkxYU90JIFuzku0hQOvd/7iDowF8E3miBiL/ifenS NytZNYCmikToAg2WcVjr7p197jtMgEknfeBOBLKWBYZ5heGfu1lUcpWXH0PTHWYi/9F6 jU2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Y5PSG8AavjoBPAFJwWSD1jFIcE5sqZs1O35q3ykZ1hI=; b=faNiJ1c/urkSN/1w0nHaQpa4iUc6gefZflwxwrPQfFS62td4X+u82/w7k5YGuhBPGO /vVOgzS7wqkEQpBNneKfGbL0LTFiNoedN9t3IGKROYvfIEZCYq5Tp08gNN/UvayuzPTZ 65QrraN13Pfs7WhllvFsfQjp0Acp36ryX08hhZXpNg7kGPmCXLorDTPaAXqctmeR0U0T 4HIDqx6T3Fu5rsHvP5KfVuAkCyrHMpbnWpu7R/I2ebevNAxaZQVlHIji/IbxY82OcMfw JDO8H2cEo4KGHJ4jzajaZtPGw0Wa76bkgTxa7atpQbdeoFNHMfHbDyZ66AfSA0BdDPxc HXng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Yi/vRXGl"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pi19-20020a17090b1e5300b002477ddfa2f3si5624038pjb.182.2023.04.17.14.11.28; Mon, 17 Apr 2023 14:11:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Yi/vRXGl"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231307AbjDQU6z (ORCPT <rfc822;leviz.kernel.dev@gmail.com> + 99 others); Mon, 17 Apr 2023 16:58:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231130AbjDQU6e (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 17 Apr 2023 16:58:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38D039747; Mon, 17 Apr 2023 13:56:28 -0700 (PDT) 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 DF82062A6A; Mon, 17 Apr 2023 20:55:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9C33C433EF; Mon, 17 Apr 2023 20:55:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681764937; bh=buAWzCxZJq6sFI4FVlHCCkhTeXIXRB+HhrOpnqKq2Bo=; h=From:To:Cc:Subject:Date:From; b=Yi/vRXGl+Fe7SQP2xUdVEqghN1XlXMudVEM97w32prLWMGIYMUIuY0ZcCTdrbu1f5 J9NkrHqcnFDdmdDp5Pd8Hsf/BGymT+zhvTr/0cTdnZQBTNLlUUdicBBLFR95ShPeA9 K65/Nr7u7QJ4b/afXFxmGEQsGyxp5wjCRicJt/FpnnRTOR3K8pmhLn9BXllMawhzAe S5t2qDBsXvyjNSX3CY9IjGwiBm8UZCA7P2SdwDHuwq4eN4mNjKDsb9ZkEVJCpHLrcZ +MldcW6U/WPovGo6wYxJztk4NxK2ZvwjjnTJ3zp+JHeywP0t9UXrYcrYR2Fc0W1RIj 7mB6ACQheIrkA== From: Arnd Bergmann <arnd@kernel.org> To: Vladimir Oltean <vladimir.oltean@nxp.com>, Claudiu Manoil <claudiu.manoil@nxp.com>, Alexandre Belloni <alexandre.belloni@bootlin.com>, UNGLinuxDriver@microchip.com, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Jacob Keller <jacob.e.keller@intel.com> Cc: Arnd Bergmann <arnd@arndb.de>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: mscc: ocelot: remove incompatible prototypes Date: Mon, 17 Apr 2023 22:55:25 +0200 Message-Id: <20230417205531.1880657-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763459360792510995?= X-GMAIL-MSGID: =?utf-8?q?1763459360792510995?= |
Series |
net: mscc: ocelot: remove incompatible prototypes
|
|
Commit Message
Arnd Bergmann
April 17, 2023, 8:55 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de> The types for the register argument changed recently, but there are still incompatible prototypes that got left behind, and gcc-13 warns about these: In file included from drivers/net/ethernet/mscc/ocelot.c:13: drivers/net/ethernet/mscc/ocelot.h:97:5: error: conflicting types for 'ocelot_port_readl' due to enum/integer mismatch; have 'u32(struct ocelot_port *, u32)' {aka 'unsigned int(struct ocelot_port *, unsigned int)'} [-Werror=enum-int-mismatch] 97 | u32 ocelot_port_readl(struct ocelot_port *port, u32 reg); | ^~~~~~~~~~~~~~~~~ Just remove the two prototypes, and rely on the copy in the global header. Fixes: 9ecd05794b8d ("net: mscc: ocelot: strengthen type of "u32 reg" in I/O accessors") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/net/ethernet/mscc/ocelot.h | 3 --- 1 file changed, 3 deletions(-)
Comments
On Mon, Apr 17, 2023 at 10:55:25PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > The types for the register argument changed recently, but there are > still incompatible prototypes that got left behind, and gcc-13 warns > about these: > > In file included from drivers/net/ethernet/mscc/ocelot.c:13: > drivers/net/ethernet/mscc/ocelot.h:97:5: error: conflicting types for 'ocelot_port_readl' due to enum/integer mismatch; have 'u32(struct ocelot_port *, u32)' {aka 'unsigned int(struct ocelot_port *, unsigned int)'} [-Werror=enum-int-mismatch] > 97 | u32 ocelot_port_readl(struct ocelot_port *port, u32 reg); > | ^~~~~~~~~~~~~~~~~ > > Just remove the two prototypes, and rely on the copy in the global > header. > > Fixes: 9ecd05794b8d ("net: mscc: ocelot: strengthen type of "u32 reg" in I/O accessors") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- Interesting, I didn't even realize we had these duplicated there. Thanks. FWIW, they were duplicated in commit 5e2563650232 ("net: mscc: ocelot: publish structure definitions to include/soc/mscc/ocelot.h") and haven't bothered anybody since then. Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <kuba@kernel.org>: On Mon, 17 Apr 2023 22:55:25 +0200 you wrote: > From: Arnd Bergmann <arnd@arndb.de> > > The types for the register argument changed recently, but there are > still incompatible prototypes that got left behind, and gcc-13 warns > about these: > > In file included from drivers/net/ethernet/mscc/ocelot.c:13: > drivers/net/ethernet/mscc/ocelot.h:97:5: error: conflicting types for 'ocelot_port_readl' due to enum/integer mismatch; have 'u32(struct ocelot_port *, u32)' {aka 'unsigned int(struct ocelot_port *, unsigned int)'} [-Werror=enum-int-mismatch] > 97 | u32 ocelot_port_readl(struct ocelot_port *port, u32 reg); > | ^~~~~~~~~~~~~~~~~ > > [...] Here is the summary with links: - net: mscc: ocelot: remove incompatible prototypes https://git.kernel.org/netdev/net-next/c/33d74c8ff5ce You are awesome, thank you!
diff --git a/drivers/net/ethernet/mscc/ocelot.h b/drivers/net/ethernet/mscc/ocelot.h index d920ca930690..ed024d6504c5 100644 --- a/drivers/net/ethernet/mscc/ocelot.h +++ b/drivers/net/ethernet/mscc/ocelot.h @@ -94,9 +94,6 @@ int ocelot_mact_forget(struct ocelot *ocelot, struct net_device *ocelot_port_to_netdev(struct ocelot *ocelot, int port); int ocelot_netdev_to_port(struct net_device *dev); -u32 ocelot_port_readl(struct ocelot_port *port, u32 reg); -void ocelot_port_writel(struct ocelot_port *port, u32 val, u32 reg); - int ocelot_probe_port(struct ocelot *ocelot, int port, struct regmap *target, struct device_node *portnp); void ocelot_release_port(struct ocelot_port *ocelot_port);