Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp305874rdb; Wed, 17 Jan 2024 02:31:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IGLyFU0GyvYfMYIMYYS9eR6JaFPTuAH3SPioR1vfHiaz9ZEudF+s3CQRh8g+h7dkiuS9r+p X-Received: by 2002:a05:6402:3086:b0:559:c3dd:6f70 with SMTP id de6-20020a056402308600b00559c3dd6f70mr802255edb.73.1705487475822; Wed, 17 Jan 2024 02:31:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705487475; cv=pass; d=google.com; s=arc-20160816; b=mkbaDQ3e3sa4SJPoin5ETWmNvd/kEOtQ4Q/au5ZTGLWIMSA0+g2hm68W6AsYg9MlSG 538hpuF6vGkOlY8Xp7y4H+hfGjllGMO1PVgyTsiyYI3tgeos/a4jkf/zT32Kz+tVPfFp 7LCB22/Ed83zgYvkK2CGwvAMdsDW4pfBMahO/SkLPXOuOa9S6k8T2XrlUAlF1JhuklIm 4dkbsImAG61wfXaKunPtkM2M5W4zUvgzB1RXbzUCUD46hoBZzCyBJ3b06c3RBYtyaWwZ Ccp2K7h9nOvTCvZDR2EAOCYmp+qDd1T9rvO9PJvJvKfaa0BWbRUe/jsG4kvVmjhlgZcC f1nA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=TZlYkCBl1Y6CdrhayBhNxw2p07BMxLVRsxuvs4s82bo=; fh=c4SWefwPnDBL/h4hfmTNJ3/EdZgKZx+7X7D6BlF0Dbw=; b=bNTkjR/1o8gU68o+ouxgynJGmnvA9bzJDZGJnBNGSUEKbmn+3d6l1EDuPsH1JocJ0l C6uSXRoqhA7qFolsQCdY7fLVJOgtLPICURKMZK0ejoGUjiiFh6ROJnEjuz5LOgvXicDr ok1aAwWdXD+jT0FX3XBcY4EOFBNPV9jTCHZrUD1iP4d3jKjsbpIocKWackSS38I3FCht ifKcBQKgjSwQkhQOn9M1Q3wWu227MhSMPInoOD9kA6N8QCOSzeFSBqG1+zCXTJGc3MQE Indotv1qD1Ovdb+sKlR+UN0hH8pFTimY8mOHDzj+kN/JIIWak28z3qadLZWs0OQu0pQh AWVQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=ef5N6e9Q; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com); spf=pass (google.com: domain of linux-kernel+bounces-28841-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28841-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t23-20020a50ab57000000b00559cc013748si735606edc.302.2024.01.17.02.31.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 02:31:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28841-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=ef5N6e9Q; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com); spf=pass (google.com: domain of linux-kernel+bounces-28841-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28841-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id EC5311F2142E for ; Wed, 17 Jan 2024 10:31:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 54A5B1EA84; Wed, 17 Jan 2024 10:29:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arinc9.com header.i=@arinc9.com header.b="ef5N6e9Q" Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 D502A1EA6F; Wed, 17 Jan 2024 10:29:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705487361; cv=none; b=MlqwbFDd3RO32UMucZTpCjyLS2jfluRTaqac/FqYl3/wNNhDV1+V36lELzrJC92f7OmU6Wkv4uXtjmUNfgwNsndUQ6pvzivtw4k4K9loxXEM6xjylNjBuVxHSWvPivhv8CJlrkpsuvVUA4FgBvPw6j4AfDuLRjCzixJrUh++9qU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705487361; c=relaxed/simple; bh=xIQosJ+6UVarhez/5hqrfFABPbGJMJaNy9tQ1jVdHEU=; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-Id: X-Mailer:In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding:X-GND-Sasl; b=HHTV6p4ckk7Lunj3Eq8a55geTBSBaWH4hs6G/uQPJ+O+RVqa74VfmfHDUUlLatJOjq7izQna9qLQh49u13Z3N9gRLW3VgHHcJZQ//bB1UudOgoMBWJ3gixIHty67qNgXGe6LODDtds6IOOFg9DXHzNvFH3ZP27w2GX+0o48wINU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arinc9.com; spf=pass smtp.mailfrom=arinc9.com; dkim=pass (2048-bit key) header.d=arinc9.com header.i=@arinc9.com header.b=ef5N6e9Q; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arinc9.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arinc9.com Received: by mail.gandi.net (Postfix) with ESMTPSA id E126D40008; Wed, 17 Jan 2024 10:29:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1705487358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TZlYkCBl1Y6CdrhayBhNxw2p07BMxLVRsxuvs4s82bo=; b=ef5N6e9QwFxk3EUuXBHTv99i4fDQfzfVUoA33JgLMIGamg7c6cDSk2inSFTfGUyl1gwiF1 11EPF30H13+8ZkF6qaN5vmPsO9j/dUMUQ0QVzxvvRlC1U/iXc+oGyANi32WHNDl7cekCr2 B5mQz6YFXqwo+oym/KfX4Q6xqgnxldvIXzSuum5SCjCPTcpA3Iwyoc1qR5+KOarVfnF0IE rw5E1LbYkGiQIIkijBsnFBQ5hSqxsQXzgnrX8hRmr0MzFMOhzGIb7nCjIw2AivihbsD5k1 JiI9nZZBOp/O49sGbPc9RxXMEEjm+Y1R3mtfOOOnktG4KWq/oIKEf7+YNv/IqQ== From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= To: Daniel Golle , Landen Chao , 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: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , mithat.guner@xeront.com, erkin.bozoglu@xeront.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [RFC PATCH net-next 6/8] net: dsa: mt7530: get rid of mt753x_mac_config() Date: Wed, 17 Jan 2024 13:28:36 +0300 Message-Id: <20240117102838.57445-7-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240117102838.57445-1-arinc.unal@arinc9.com> References: <20240117102838.57445-1-arinc.unal@arinc9.com> 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 X-GND-Sasl: 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 --- 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 76b304f8fb87..680e59732d94 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -2617,16 +2617,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) @@ -2652,8 +2642,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