Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3899054rdb; Thu, 14 Sep 2023 06:16:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFUwD3e3a//Gzy9OaPpDJfCcmzxbtNJQzS6pDqHp6cmPotfRHzzZH5fIE0LlKTl2oe22tBg X-Received: by 2002:a05:6a21:8194:b0:130:d5a:e40e with SMTP id pd20-20020a056a21819400b001300d5ae40emr4363798pzb.7.1694697362327; Thu, 14 Sep 2023 06:16:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694697362; cv=none; d=google.com; s=arc-20160816; b=bkc/RLt064PEi3Q+AkNd/NEVYttSvUquDCzU8Rrnz+14jkTpyllfQ2QSwtTj5K3z/U 9i+LieNFxRJXXQFCpJhjpsbgOrnakauZWPpwYw9KWkibJROLp1/39xK7oX70+r5wnq7p xeAcZuljJv9tI8jFKYoIiBSwt71Vw7CRI79RC9EWR6a3sfvRXQyNjMpNpidEhjAImUEl O6YT/MPxAWJI3m3/v5X6/dH5xNvEa9+JMJDo9PVmhCOe8W6QiZqAhtPvvHH0NIk7p71H sIr9bnOSHBI5l0v52EGIUcAkAlqKBUsiXnK663p5Gn7fo2lZSVmrAVuY5Yp3Sqchue8A 53HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Yo50SWHhIz7Yy2lXO4ZX2kmUueisAO2pLYnkYdgeUvQ=; fh=ISHokiotdgkHDB1Tr/Hbi+j0RESFt17KBLYRdD/B8s4=; b=BHWd7EM64YCTu+O3RtCCKYTv5B9xSmU0bcIF2SNbCDyis/doxXOG3IGgq9Lk0WmT19 gzIFXFHcD+aFzGtYp6zWhwDkTqeG2PTZJJFn5vK90WdVm/8GTDVZjnZqTtzOgf8bccYy 303h9CyRMSSmiQ69BYkKTbJ6AR2hsLyFvtDau2ubMMUtA1ISlkyWNXMRzzuvh8KV/k/Y YqgDNACF929BwvG2dAZQEBhWIVtGfQgZSH1lGM8+5oMZFgNs8j+Qd2c85h63DnOUDM+j AMtA8pSWjxUemnvT8IdIeR0GmoXbpyccdO2UHBDtURHPOXrZBk9E4SecNQyoBgcTZUo4 /3LQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id f18-20020a17090aa79200b0026d01e90c10si1641031pjq.65.2023.09.14.06.16.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 06:16:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id A3BF282665B8; Thu, 14 Sep 2023 06:12:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238812AbjINNME (ORCPT + 99 others); Thu, 14 Sep 2023 09:12:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238750AbjINNL7 (ORCPT ); Thu, 14 Sep 2023 09:11:59 -0400 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3E6D1FD8 for ; Thu, 14 Sep 2023 06:11:55 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qgm8J-0002Jp-R9; Thu, 14 Sep 2023 15:11:47 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qgm8I-006JUJ-89; Thu, 14 Sep 2023 15:11:46 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1qgm8I-000657-0b; Thu, 14 Sep 2023 15:11:46 +0200 From: Oleksij Rempel To: "David S. Miller" , Andrew Lunn , Eric Dumazet , Florian Fainelli , Jakub Kicinski , Paolo Abeni , Vladimir Oltean , Woojung Huh , Arun Ramadoss , "Russell King (Oracle)" Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, Petr Machata , Lukasz Majewski Subject: [PATCH net-next 1/2] net: dsa: microchip: Move *_port_setup code to dsa_switch_ops::port_setup() Date: Thu, 14 Sep 2023 15:11:44 +0200 Message-Id: <20230914131145.23336-1-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 14 Sep 2023 06:12:28 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 groat.vger.email Right now, the *_port_setup code is in dsa_switch_ops::port_enable(), which is not the best place for it. This patch moves it to a more suitable place, dsa_switch_ops::port_setup(), to match the function's purpose and name. This patch is a preparation for coming ACL support patch. Signed-off-by: Oleksij Rempel --- drivers/net/dsa/microchip/ksz_common.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c index 54048b82db71..209a5243bd5a 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -2564,8 +2564,7 @@ static int ksz_port_mdb_del(struct dsa_switch *ds, int port, return dev->dev_ops->mdb_del(dev, port, mdb, db); } -static int ksz_enable_port(struct dsa_switch *ds, int port, - struct phy_device *phy) +static int ksz_port_setup(struct dsa_switch *ds, int port) { struct ksz_device *dev = ds->priv; @@ -3497,7 +3496,7 @@ static const struct dsa_switch_ops ksz_switch_ops = { .phylink_mac_config = ksz_phylink_mac_config, .phylink_mac_link_up = ksz_phylink_mac_link_up, .phylink_mac_link_down = ksz_mac_link_down, - .port_enable = ksz_enable_port, + .port_setup = ksz_port_setup, .set_ageing_time = ksz_set_ageing_time, .get_strings = ksz_get_strings, .get_ethtool_stats = ksz_get_ethtool_stats, -- 2.39.2