Message ID | 20240301-for-netnext-mt7530-improvements-3-v3-6-449f4f166454@arinc9.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-88274-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp990675dyb; Fri, 1 Mar 2024 02:45:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWpY6e8Ow26RpUIOT2fQoagcK+Qnbciqk8b9aw7HpIxDss8O/BZTWwtJMQm7jufGiTer7q4K0WtHCLcumdVgcn1MoQObQ== X-Google-Smtp-Source: AGHT+IH/F4NsO7nxUlaIEZgy4bXjPm3D/fe6fK9sRvnbhtMk3+r9KudGnXyydtqcCwTlfhUjwDvG X-Received: by 2002:a05:6a21:6d81:b0:19e:5ac2:a342 with SMTP id wl1-20020a056a216d8100b0019e5ac2a342mr1863992pzb.17.1709289934045; Fri, 01 Mar 2024 02:45:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709289934; cv=pass; d=google.com; s=arc-20160816; b=E9iXwWWcCenfz34hRrYCJhE9kP9Kh859k11h2qJx0ylDbmpOlsxwuQwXVl8HHXB2RB psk9yMTmTk/DkqDKPi0zRIs+nVKVJhzA/8L0oXkeejb16pEBneJB3FAMR+lZqgtUXQJl V5vGaZc4Fp5qiNJT9hyHowiHcFkoTAUqeHE+rhAlMrz9GGIZr0pO7ierfFCGBDKItIbh Or2G5Z/idt+LHmJYfo5whFksPufTNBkb6qSorA/kZHggGUxWBR3tbFTFRzKY5vmY5P5y iTOF9Ijyb4ci8JoBAhp5cOx/4EnnnlZ+LsKzv5TaJVgu703vcugChOtp4CHeQZTXQsOI H6fg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=D7Glp+FTdSQTPYlNgz0Rlu6sscJo3c4ZMaJwNOngbAU=; fh=xNlE86XmqkSplYYMvvd74gD/RbF2aUqtHPBgVCVc3H8=; b=uKrl/HK/ZcmecELZry/L4IRodT9w+ODepe+vk4V6bCmJ9wjhSxCJ2U7teMWrsA5gJP GkKBl/8XIeT/7+eyKvfVpHafLPtINIAR/H1beBVp/Bo9KzkUtEANNiCFAjc9LsYt49Dc kHMXPz/xQF/Aphivf1d9lGW4/vp13/LcJrYFOVvEtyysi2FTTgM+xKlKbjXcSnlt9vpm doC8wZXlS65VEKlR/rDcUkDyNQEKljT8NEJZoEqDLDwpo6q0PdFaxdCqFiFBlCS+RqEH ZRu05f9FZiCPT0MmOC0D73YDwhSKHMtwqA9Nw1NJzcr46MrfOyslPgLHf3AYYE9V4ow7 mpsg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uSYTX+tw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-88274-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88274-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id lp17-20020a056a003d5100b006e5a7a66846si2289125pfb.150.2024.03.01.02.45.33 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 02:45:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88274-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uSYTX+tw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-88274-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88274-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D6B2A2859B0 for <ouuuleilei@gmail.com>; Fri, 1 Mar 2024 10:45:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2332870ACB; Fri, 1 Mar 2024 10:43:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uSYTX+tw" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64A446BFA5; Fri, 1 Mar 2024 10:42:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709289779; cv=none; b=r6PGwHTFlsLSC90Z7PsXd+NyEo4VLrxApqYDN6Y+cz6pZDILl0UX7C3BELa1GXCOhhyLLkDCs0ae+ehIuxZyTAaeAZb3LGy+/jekHgmB5P05cb7hPGmroIzHgChSko2aWeC+wz0/+WDL1SL+pxfYPyQ5DmkhspO4hI2hsXZbKVM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709289779; c=relaxed/simple; bh=kX85+BHUILFIoP4X6xIr9jJ6kAHMS4KcDN2tshuSuHQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HxZZf5wKoZYXYgI4GDOfnxc456ZZsl72JJcdR5MgHefPVKZ7VTwynJGzI0JoiCKwfXd+OxwYFu6pWHMnAY7egCqaW9KpZSS1FrgkWX1lAQbPepxes9abaxe65w10m0R7QnZ/sgIsj1Xy63SwhMsrUZCFhKfgqPgN4EXVbXq4Ifw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uSYTX+tw; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 0C25DC43609; Fri, 1 Mar 2024 10:42:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709289779; bh=kX85+BHUILFIoP4X6xIr9jJ6kAHMS4KcDN2tshuSuHQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=uSYTX+twQJfmMJBIippEzWC8M8R2zkbkT8fF/X4cxDCledXVZ3G6FuwEOuj/5m8G4 OGagzDS6BsU+CKbEoeQV1CguLIO7Tm7SkfY04qEZOeTXGgo1eUOfERF/AvEIT2vEQf cE2criWG4dS6eMgJlBdHWfG3U0SKeWAxqMJvZBjSX0xFlIzP+T2q0WCjtDSOzk1g43 Lhw1zhaFDK4XatcCqJz9W3JBBDR9dcuLecaSFyR8s/vTczL332QqT510V2Oi/Go/UU JcL2pmp4TFfnqhQdUgj406XrAzSHviwVG2aR7uI47gfJhNacvCBIcyMBSTlSuZ1fM5 /nafAIahokwJw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id ECBF0C5475B; Fri, 1 Mar 2024 10:42:58 +0000 (UTC) From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= via B4 Relay <devnull+arinc.unal.arinc9.com@kernel.org> Date: Fri, 01 Mar 2024 12:43:02 +0200 Subject: [PATCH net-next v3 6/9] net: dsa: mt7530: get rid of mt753x_mac_config() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240301-for-netnext-mt7530-improvements-3-v3-6-449f4f166454@arinc9.com> References: <20240301-for-netnext-mt7530-improvements-3-v3-0-449f4f166454@arinc9.com> In-Reply-To: <20240301-for-netnext-mt7530-improvements-3-v3-0-449f4f166454@arinc9.com> To: Daniel Golle <daniel@makrotopia.org>, DENG Qingfang <dqfext@gmail.com>, Sean Wang <sean.wang@mediatek.com>, Andrew Lunn <andrew@lunn.ch>, Florian Fainelli <f.fainelli@gmail.com>, Vladimir Oltean <olteanv@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Russell King <linux@armlinux.org.uk> Cc: mithat.guner@xeront.com, erkin.bozoglu@xeront.com, Bartel Eerdekens <bartel.eerdekens@constell8.be>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal@arinc9.com> X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709289776; l=1494; i=arinc.unal@arinc9.com; s=arinc9-Xeront; h=from:subject:message-id; bh=8u7euwYTcc58UJEZ934iSyhrRKaOIduS6lOdsKOd2oQ=; b=CuKSG8ZKfZXUavxJ8+US5J8hRU3RJR/w4dge8UOfky7+xPVutxnu5IricMLLQQWyejQQOG5+g 6kgpOcLdoJiBe6485TrqwGcf1yu5j/s0HRJPH2k+UYkVhi87eHDrPkE X-Developer-Key: i=arinc.unal@arinc9.com; a=ed25519; pk=z49tLn29CyiL4uwBTrqH9HO1Wu3sZIuRp4DaLZvtP9M= X-Endpoint-Received: by B4 Relay for arinc.unal@arinc9.com/arinc9-Xeront with auth_id=137 X-Original-From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal@arinc9.com> Reply-To: <arinc.unal@arinc9.com> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792320401985993961 X-GMAIL-MSGID: 1792320401985993961 |
Series |
MT7530 DSA Subdriver Improvements Act III
|
|
Commit Message
Arınç ÜNAL via B4 Relay
March 1, 2024, 10:43 a.m. UTC
From: Arınç ÜNAL <arinc.unal@arinc9.com> There is no need for a separate function to call priv->info->mac_port_config(). Call it from mt753x_phylink_mac_config() instead and remove mt753x_mac_config(). Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com> --- drivers/net/dsa/mt7530.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index 80b65f064310..e353c03dd1db 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -2634,16 +2634,6 @@ mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode, } } -static void -mt753x_mac_config(struct dsa_switch *ds, int port, unsigned int mode, - const struct phylink_link_state *state) -{ - struct mt7530_priv *priv = ds->priv; - - if (priv->info->mac_port_config) - priv->info->mac_port_config(ds, port, mode, state->interface); -} - static struct phylink_pcs * mt753x_phylink_mac_select_pcs(struct dsa_switch *ds, int port, phy_interface_t interface) @@ -2669,8 +2659,8 @@ mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode, struct mt7530_priv *priv = ds->priv; u32 mcr_cur, mcr_new; - if (port == 5 || port == 6) - mt753x_mac_config(ds, port, mode, state); + if ((port == 5 || port == 6) && priv->info->mac_port_config) + priv->info->mac_port_config(ds, port, mode, state->interface); mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port)); mcr_new = mcr_cur;