From patchwork Mon Apr 3 01:18:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 78318 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1999483vqo; Sun, 2 Apr 2023 18:19:56 -0700 (PDT) X-Google-Smtp-Source: AKy350Y4HDyc702owCWRZbiq+Ko3YwVVE9pHatLzHwoI8ty0bsyxqOyDAl4C3BqjiLrpAKM0e5Pf X-Received: by 2002:a17:90b:3807:b0:23f:e675:9c4a with SMTP id mq7-20020a17090b380700b0023fe6759c4amr37624409pjb.21.1680484796192; Sun, 02 Apr 2023 18:19:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680484796; cv=none; d=google.com; s=arc-20160816; b=xitkG7j1QgwSRrT937Vo6b+hjezQCbvh6TS2BaHUFxqNqm3xdHHLevEca5gaCRLhjw 0YuhnpPdH7I3w1/xPA9z6QCRwZmGHUoONAZjhCG2IiNmO+Op4eYQqYEDtJTS5CdjrZSp fOVvqwYTCnU9YC3xBdPY7QcXcZhQOryveOrvlRHYfeQNzgB+STo+hAeTMahZq21Zazvl YbbtU4KEWec30euRJt5MFXPd9FsUlAsGIuxsSyyG8/5LhCAMxsqm72wS4dF3roFkfrBT nMFthqeiQ28cEd2WAVSAaAz6vCWHWLxYu5gPdV4QaKeLxl5aMPw6jrbM6ngmKPhvN8e0 Z2eg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v2-20020a17090a4ec200b00233c5363cdcsi6992071pjl.142.2023.04.02.18.19.44; Sun, 02 Apr 2023 18:19:56 -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 S231167AbjDCBTH (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-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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762116025872433682?= X-GMAIL-MSGID: =?utf-8?q?1762116025872433682?= 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 {