Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3900264rwl; Sun, 2 Apr 2023 18:19:34 -0700 (PDT) X-Google-Smtp-Source: AK7set8NQ1kakWSSKDe/weAj4SORJEyCqpEeQTrKF3pGnB9OOI6ak1ZzXr22zvgv1dk7cO+cY9iZ X-Received: by 2002:a05:6a20:3156:b0:db:3293:278f with SMTP id 22-20020a056a20315600b000db3293278fmr29941763pzk.44.1680484774493; Sun, 02 Apr 2023 18:19:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680484774; cv=none; d=google.com; s=arc-20160816; b=aR5Mpup4QnbAVLObDa+nT9Q/1NCQsFuF2+b8mDzJcH87s8RLliFhDQBpkVmpB48Hyl zvHrug78JH2yEa+KGRefrcr93C9rwJliuux4pu+uCJ8t8EUOaSUkjfKTYJb72BnVDHXV jAK+qGpHzr71TR4oURDH0mmKLy+PUd3bdkkxYX6ZgY0tPg6s57y8pN/3aYshBDZUs93D 7FQSxloojyPL81Gx3gK/kf+ROwo60oo3DGSfdPl3JwyEF9qxDoaLE5IOv5fd6YZgK1v2 pLpeN7leKIJeiRTHrEwFeJL9pAiYXKupEGF8RbCN8SohlNJJh3AaYmR3xNmS17V0FoHB B/SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=vZAdKNrLP/fWtn4zwWlSrvf7IKfltZjhJkRdzXE2ttI=; b=X1B8Bfkpiu2/tqYiKTa6hYTqS1mSGp/qOnBFDzeP6b0kXD6nPh6tNtlSABVyuKGPK6 9W3j1re+1jVVtBz/iw2nw8IQrVRehuxu6zcfed49xpzIi8/ndQRnJEFQjq8ikmoXK3Di egn3mK0iAkzT6c5KyA2AIe/dBvwhmNluXmP2KbzzOOI2H7KeV84xd8mjQr/5ZZW9AIiL u7y9OWzKANbR1tw7l/lN+46GZIi1BHRaAkrh4jcqE9AsYbdGWKvposdyE55sH5hgKeT5 g0P0zMAowNCqpheszb8+FDd1C+S8MyP6hbixA2ICRthely1Ohdtg55HbmrcKpIH37Yi6 uRVA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b18-20020a63e712000000b005138c1f1fc4si7317629pgi.573.2023.04.02.18.19.23; Sun, 02 Apr 2023 18:19:34 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231245AbjDCBTH (ORCPT + 99 others); Sun, 2 Apr 2023 21:19:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231249AbjDCBTE (ORCPT ); Sun, 2 Apr 2023 21:19:04 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0D79C65C; Sun, 2 Apr 2023 18:18:35 -0700 (PDT) Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1pj8q8-0004jw-1f; Mon, 03 Apr 2023 03:18:32 +0200 Date: Mon, 3 Apr 2023 02:18:28 +0100 From: Daniel Golle To: netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Sean Wang , Landen Chao , DENG Qingfang , Philipp Zabel , Russell King , =?utf-8?B?QXLEsW7DpyDDnG5hbA==?= Cc: Sam Shih , Lorenzo Bianconi , John Crispin , Felix Fietkau Subject: [PATCH net-next v2 07/14] net: dsa: mt7530: move p5_intf_modes() function to mt7530.c Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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: X-Mailing-List: linux-kernel@vger.kernel.org In preparation of splitting mt7530.c into a driver for MDIO-connected as well as MDIO-accessed built-in switches on one hand and MMIO-accessed built-in switches move the p5_inft_modes() function from mt7530.h to mt7530.c. The function is only needed there and will trigger a compiler warning about a defined but unused function otherwise when including mt7530.h in the to-be-introduced bus-specific drivers. Signed-off-by: Daniel Golle Reviewed-by: Andrew Lunn --- drivers/net/dsa/mt7530.c | 18 ++++++++++++++++++ drivers/net/dsa/mt7530.h | 18 ------------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index 9d49cbc8ddcb2..1215d5e4dd38a 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -943,6 +943,24 @@ mt7530_set_ageing_time(struct dsa_switch *ds, unsigned int msecs) return 0; } +static const char *p5_intf_modes(unsigned int p5_interface) +{ + switch (p5_interface) { + case P5_DISABLED: + return "DISABLED"; + case P5_INTF_SEL_PHY_P0: + return "PHY P0"; + case P5_INTF_SEL_PHY_P4: + return "PHY P4"; + case P5_INTF_SEL_GMAC5: + return "GMAC5"; + case P5_INTF_SEL_GMAC5_SGMII: + return "GMAC5_SGMII"; + default: + return "unknown"; + } +} + static void mt7530_setup_port5(struct dsa_switch *ds, phy_interface_t interface) { struct mt7530_priv *priv = ds->priv; diff --git a/drivers/net/dsa/mt7530.h b/drivers/net/dsa/mt7530.h index 39aaca50961bd..2a611173a7d08 100644 --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h @@ -682,24 +682,6 @@ enum p5_interface_select { P5_INTF_SEL_GMAC5_SGMII, }; -static const char *p5_intf_modes(unsigned int p5_interface) -{ - switch (p5_interface) { - case P5_DISABLED: - return "DISABLED"; - case P5_INTF_SEL_PHY_P0: - return "PHY P0"; - case P5_INTF_SEL_PHY_P4: - return "PHY P4"; - case P5_INTF_SEL_GMAC5: - return "GMAC5"; - case P5_INTF_SEL_GMAC5_SGMII: - return "GMAC5_SGMII"; - default: - return "unknown"; - } -} - struct mt7530_priv; struct mt753x_pcs { -- 2.40.0