Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp205108lqg; Fri, 1 Mar 2024 02:45:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUbXTn3Br1/OVchw66UGZw3EaB83ac2BNNpwGPNOJAKxg++8tQnTXGwjTUG7uYJuaQSHTypvU3u4pk4xSZ286A2NThCBo850stqjqi4QA== X-Google-Smtp-Source: AGHT+IGlTLE7Q6sPUYKyJDJEiBXp5Ye5XIc48rhrnRHwnp6A/tMTNMTxMA+CobWl9v3YRddH3wV3 X-Received: by 2002:a05:6a20:d043:b0:1a0:fea5:ae58 with SMTP id hv3-20020a056a20d04300b001a0fea5ae58mr6543188pzb.8.1709289904095; Fri, 01 Mar 2024 02:45:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709289904; cv=pass; d=google.com; s=arc-20160816; b=XxeOwLPJOcPqusP1qklzmFCutqiZif/gSmdK4qCiW1nl58oyCNiWGY8vYXdrAUN90t CDwHxWX0njvmVqKSG1iiwSA3HDK7T4N8EWY8rvMSaLOJRnZtLbYRhbo/y/5cSNLLCArN hp9srzZ6Kcg0BXoF4eAtE6nmEk8cj1Ot7yq/k+tN7DvnAVOPIwO5VTY2dKYEunEmRK7p vV3L1gmfafnSEk6IjiNpbthhgKizwmjlDu3rNiIz/E/OwLgrLKo81t1hItISebxjsK1E +T0quQIZ9zvBIoLkKjRncXDuTIjKIJaVful+CfagAuD+369JdalQIbLUEfhGQGVNGjfn NxQA== 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-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88274-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u24-20020a656718000000b005dbdce9d103si3407541pgf.563.2024.03.01.02.45.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 02:45:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88274-linux.lists.archive=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-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88274-linux.lists.archive=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 C24E4284C7E for ; Fri, 1 Mar 2024 10:45:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4605A6F076; Fri, 1 Mar 2024 10:43:03 +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 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: List-Subscribe: List-Unsubscribe: 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 , DENG Qingfang , Sean Wang , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King Cc: mithat.guner@xeront.com, erkin.bozoglu@xeront.com, Bartel Eerdekens , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, =?utf-8?q?Ar=C4=B1n=C3=A7_=C3=9CNAL?= 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==?= Reply-To: From: Arınç ÜNAL 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 --- 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; -- 2.40.1