Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp832037rwl; Wed, 29 Mar 2023 09:02:35 -0700 (PDT) X-Google-Smtp-Source: AKy350YwhoeNEk7MtaM6QqJgBbnXm6ra/61JuAJ1mkamG8CDu7VaClcVK/90/M3HLu3BoWBdginr X-Received: by 2002:a17:902:db05:b0:19f:2dff:21a2 with SMTP id m5-20020a170902db0500b0019f2dff21a2mr22591316plx.64.1680105755088; Wed, 29 Mar 2023 09:02:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680105755; cv=none; d=google.com; s=arc-20160816; b=NoKjX/11to8mco+JcbXDsGDSY7Rcbgo54PwbkG4DtGxChSVKqKr1+yAbxKpY2F3X/W qlY1YvgmhF2I5f/OQ68B4LdPvTX3bThHD5GVvUqI37w0zSBpmWMZm2k0wWQsuSlHL1ta A4sNslRrV3gdVLTuUJ8bEldlnrYlDuM3K3lwKQerthB4JOqfUYUCL2deaYREoArgMJai GuKXzslJ51LqFX9CBU/gQ772cefuSwqBNpZpX4kCDhFZWgAMBQbDrgN+g3BI8x5eJz1n Idk1dsNWuLoeANsDs54c2T0oy5htFoowJbUnM8bUNX7WfaFRSNY5OFE4bgtEZzj5ha7N f0cw== 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=X/vg3LHJEYX8njHmHR1XRnTW1s07I4OfY1UbowpGtCQ=; b=o6H5o99oKe5hj0a03hCXqY8QuWYv/YX0SWmzdcTQQI5BmiIlUd2XmdyqaEMvLzrCg0 w2n6rKYkDZ2d1y2f+3OsLE98GATL5g6pHu+HVnayJ2D37my5FOVjyEBGnrYnv5iNDKvs 3ino9W2WTAoQv+KIzr6vkm2WkJqER8ecIpvTIaKsoI2yMhaMnE+HD5P56MpimTxCP5nJ cEf67VQGJxDNlUpt01pOCFR1tGc5UP1isxTZR1HjsCPGtAEjPSTrEEbwABjboDmgbTmf iiP4KQD3qyZS2MikpnEarkyzvJVRmvGLJn+gXJMEwp4OwBZ1zngohWcv0qbAo5cKOlr2 knsg== 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 b10-20020a170902d88a00b0019e6d80f948si32515975plz.485.2023.03.29.09.02.21; Wed, 29 Mar 2023 09:02:35 -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 S229847AbjC2QAJ (ORCPT + 99 others); Wed, 29 Mar 2023 12:00:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231437AbjC2P7R (ORCPT ); Wed, 29 Mar 2023 11:59:17 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D017059E7; Wed, 29 Mar 2023 08:58:42 -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 1phYC7-0003Ne-1w; Wed, 29 Mar 2023 17:58:40 +0200 Date: Wed, 29 Mar 2023 16:58:35 +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 Cc: Sam Shih , Lorenzo Bianconi , John Crispin , Felix Fietkau Subject: [RFC PATCH net-next v3 06/15] net: dsa: mt7530: move p5_intf_modes() function to mt7530.c Message-ID: <98fc2eec00985854010e3d0d16ba7f4c924ab49f.1680105013.git.daniel@makrotopia.org> 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 --- 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 033e70b42b12a..221d56cf9e710 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -946,6 +946,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.39.2