Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4199748rwl; Mon, 10 Apr 2023 07:35:45 -0700 (PDT) X-Google-Smtp-Source: AKy350ZJNTSO/mhuiiVOwYUO5NCvm/Xn+afj4rWz48BUclUFuu2dtbn5zraMMjnB93Yd/Q5rnc6d X-Received: by 2002:a17:90b:3908:b0:234:a9df:db96 with SMTP id ob8-20020a17090b390800b00234a9dfdb96mr10455473pjb.33.1681137345396; Mon, 10 Apr 2023 07:35:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681137345; cv=none; d=google.com; s=arc-20160816; b=jJibW9PKJFpH896iqrQGel6pHm0ibJ60v3WYkjJvvZRZoO249iFGgBVl9NpQDQGynh 4BRSDY2bwG33W3n+xdjhimItYsBSq5jFQ5rEUwwsQedc/m8+slXqdexYagsHS8iRu2wk 4lk/mPUxYvXqFOSqDef5vbUMpbLzNbxVyPtvHfyeMQeoYMskoGprf5wBOChO2kCaY2c3 nEMCC6Cy9d1BODCu0xtO8cmozR5gX5yWoNS5Jlt0Mxj+f6bU0aJdefwF5O2ijLbOqFT0 i0GHPArwUpv2ohbC/e4w/czLlPX9RQueXkvfIZ2RXSilQp6kzxf5wYp3Dz6E5ntqUvzZ hIDg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=qTTTlGyMAyVPocxqZKjQ6K/bNrQPOB7oSrMeVrvgD0Y=; b=jlCZRV776hl60Z8VEohitqOBq1rf6LcX7jKWXT6cMlec35OYdpoii3Z32DsKzBPyAS eYD52DpVRI2sWdmJuqV7AWNA3ZPekJhWSVgeVzKBB7Vgt0Afq+51SkTG7/3ZId3c2Nhk RnG86MJ23Brgwo7J8gWmbRl5eXzZWbOPLW6JrsHTVwCzXnxMzpXRFaCqcd81J226yf3D UJ06MvfA//F9U/2DEwIdiQ+ZI3Bw0aJzF4Nu6OZLas+ZnpIbkS4oFQghbjJ5iSVofmJ3 int1Uk17zUs7pAMeHV+nKaR6RuRreDa6k+OWtEqMRQa3dhV26i2+m3Z7Spj94gSvcVTo S6Rg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id md18-20020a17090b23d200b002469374fe86si4222261pjb.115.2023.04.10.07.35.32; Mon, 10 Apr 2023 07:35:45 -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 S229669AbjDJOes (ORCPT + 99 others); Mon, 10 Apr 2023 10:34:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229536AbjDJOer (ORCPT ); Mon, 10 Apr 2023 10:34:47 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C4704ED2; Mon, 10 Apr 2023 07:34:46 -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 1plsbF-0007aS-0m; Mon, 10 Apr 2023 16:34:29 +0200 Date: Mon, 10 Apr 2023 15:34:26 +0100 From: Daniel Golle To: arinc9.unal@gmail.com Cc: Sean Wang , Landen Chao , DENG Qingfang , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King , =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= , Richard van Schagen , Richard van Schagen , Frank Wunderlich , 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: Re: [RFC PATCH v2 net-next 08/14] net: dsa: mt7530: remove pad_setup function pointer Message-ID: References: <20230407134626.47928-1-arinc.unal@arinc9.com> <20230407134626.47928-9-arinc.unal@arinc9.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230407134626.47928-9-arinc.unal@arinc9.com> 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 On Fri, Apr 07, 2023 at 04:46:20PM +0300, arinc9.unal@gmail.com wrote: > From: Arınç ÜNAL > > The pad_setup function pointer was introduced with 88bdef8be9f6 ("net: dsa: > mt7530: Extend device data ready for adding a new hardware"). It was being > used to set up the core clock and port 6 of the MT7530 switch, and pll of > the MT7531 switch. > > All of these were moved to more appropriate locations, and it was never > used for the switch on the MT7988 SoC. Therefore, this function pointer > hasn't got a use anymore. Remove it. > > Tested-by: Arınç ÜNAL > Signed-off-by: Arınç ÜNAL Acked-by: Daniel Golle > --- > drivers/net/dsa/mt7530.c | 36 ++---------------------------------- > drivers/net/dsa/mt7530.h | 3 --- > 2 files changed, 2 insertions(+), 37 deletions(-) > > diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c > index c636a888d194..0a6d1c0872be 100644 > --- a/drivers/net/dsa/mt7530.c > +++ b/drivers/net/dsa/mt7530.c > @@ -473,12 +473,6 @@ mt7530_setup_port6(struct dsa_switch *ds, phy_interface_t interface) > return 0; > } > > -static int > -mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface) > -{ > - return 0; > -} > - > static bool mt7531_dual_sgmii_supported(struct mt7530_priv *priv) > { > u32 val; > @@ -488,12 +482,6 @@ static bool mt7531_dual_sgmii_supported(struct mt7530_priv *priv) > return (val & PAD_DUAL_SGMII_EN) != 0; > } > > -static int > -mt7531_pad_setup(struct dsa_switch *ds, phy_interface_t interface) > -{ > - return 0; > -} > - > static void > mt7531_pll_setup(struct mt7530_priv *priv) > { > @@ -2576,14 +2564,6 @@ static void mt7988_mac_port_get_caps(struct dsa_switch *ds, int port, > } > } > > -static int > -mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state) > -{ > - struct mt7530_priv *priv = ds->priv; > - > - return priv->info->pad_setup(ds, state->interface); > -} > - > static int > mt7530_mac_config(struct dsa_switch *ds, int port, unsigned int mode, > phy_interface_t interface) > @@ -2754,8 +2734,6 @@ mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode, > if (priv->p6_interface == state->interface) > break; > > - mt753x_pad_setup(ds, state); > - > if (mt753x_mac_config(ds, port, mode, state) < 0) > goto unsupported; > > @@ -3053,11 +3031,6 @@ static int mt753x_set_mac_eee(struct dsa_switch *ds, int port, > return 0; > } > > -static int mt7988_pad_setup(struct dsa_switch *ds, phy_interface_t interface) > -{ > - return 0; > -} > - > static int mt7988_setup(struct dsa_switch *ds) > { > struct mt7530_priv *priv = ds->priv; > @@ -3119,7 +3092,6 @@ const struct mt753x_info mt753x_table[] = { > .phy_write_c22 = mt7530_phy_write_c22, > .phy_read_c45 = mt7530_phy_read_c45, > .phy_write_c45 = mt7530_phy_write_c45, > - .pad_setup = mt7530_pad_clk_setup, > .mac_port_get_caps = mt7530_mac_port_get_caps, > .mac_port_config = mt7530_mac_config, > }, > @@ -3131,7 +3103,6 @@ const struct mt753x_info mt753x_table[] = { > .phy_write_c22 = mt7530_phy_write_c22, > .phy_read_c45 = mt7530_phy_read_c45, > .phy_write_c45 = mt7530_phy_write_c45, > - .pad_setup = mt7530_pad_clk_setup, > .mac_port_get_caps = mt7530_mac_port_get_caps, > .mac_port_config = mt7530_mac_config, > }, > @@ -3143,7 +3114,6 @@ const struct mt753x_info mt753x_table[] = { > .phy_write_c22 = mt7531_ind_c22_phy_write, > .phy_read_c45 = mt7531_ind_c45_phy_read, > .phy_write_c45 = mt7531_ind_c45_phy_write, > - .pad_setup = mt7531_pad_setup, > .cpu_port_config = mt7531_cpu_port_config, > .mac_port_get_caps = mt7531_mac_port_get_caps, > .mac_port_config = mt7531_mac_config, > @@ -3156,7 +3126,6 @@ const struct mt753x_info mt753x_table[] = { > .phy_write_c22 = mt7531_ind_c22_phy_write, > .phy_read_c45 = mt7531_ind_c45_phy_read, > .phy_write_c45 = mt7531_ind_c45_phy_write, > - .pad_setup = mt7988_pad_setup, > .cpu_port_config = mt7988_cpu_port_config, > .mac_port_get_caps = mt7988_mac_port_get_caps, > .mac_port_config = mt7988_mac_config, > @@ -3186,9 +3155,8 @@ mt7530_probe_common(struct mt7530_priv *priv) > /* Sanity check if these required device operations are filled > * properly. > */ > - if (!priv->info->sw_setup || !priv->info->pad_setup || > - !priv->info->phy_read_c22 || !priv->info->phy_write_c22 || > - !priv->info->mac_port_get_caps || > + if (!priv->info->sw_setup || !priv->info->phy_read_c22 || > + !priv->info->phy_write_c22 || !priv->info->mac_port_get_caps || > !priv->info->mac_port_config) > return -EINVAL; > > diff --git a/drivers/net/dsa/mt7530.h b/drivers/net/dsa/mt7530.h > index 01db5c9724fa..9e5b99b853ba 100644 > --- a/drivers/net/dsa/mt7530.h > +++ b/drivers/net/dsa/mt7530.h > @@ -697,8 +697,6 @@ struct mt753x_pcs { > * @phy_write_c22: Holding the way writing PHY port using C22 > * @phy_read_c45: Holding the way reading PHY port using C45 > * @phy_write_c45: Holding the way writing PHY port using C45 > - * @pad_setup: Holding the way setting up the bus pad for a certain > - * MAC port > * @phy_mode_supported: Check if the PHY type is being supported on a certain > * port > * @mac_port_validate: Holding the way to set addition validate type for a > @@ -719,7 +717,6 @@ struct mt753x_info { > int regnum); > int (*phy_write_c45)(struct mt7530_priv *priv, int port, int devad, > int regnum, u16 val); > - int (*pad_setup)(struct dsa_switch *ds, phy_interface_t interface); > int (*cpu_port_config)(struct dsa_switch *ds, int port); > void (*mac_port_get_caps)(struct dsa_switch *ds, int port, > struct phylink_config *config); > -- > 2.37.2 >