From nobody Fri Dec 19 16:00:46 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9B86C83F16 for ; Tue, 29 Aug 2023 10:57:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229819AbjH2K4h (ORCPT ); Tue, 29 Aug 2023 06:56:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235336AbjH2K4b (ORCPT ); Tue, 29 Aug 2023 06:56:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D8F5CED for ; Tue, 29 Aug 2023 03:56:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0FA25654C1 for ; Tue, 29 Aug 2023 10:55:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4FA40C433CD; Tue, 29 Aug 2023 10:54:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693306500; bh=A+5nG12JdLHOmwCPVbQZNkwbQxDQAPFkHb/v3gCs8sA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W2ahLA50bma1QLPHaodGNXXSV9T3Q9UY5bvsW9kd9ssS5ERdVxc5LKzU9OKNxHUPk xkBMSxO3OdAotiptLyxdrh/+f44tlMwQnAhWHgkHSEyhGkizAm02Xb3yNGMbUVveNG xNI2tCNpU9yWqR0Fzdj6SgQ5KvdNhG4EKB9Dt03v4BayQtWFmRRwsrTrHRxl7JNISE PBYYlL79dMb4yLFQzIS2pXQlfH8POXzBtDMKyD2h6Q0oorALpq/c2XzMnsId0aarMx 4f+Qzr1MLHLvhZ9egLBqNchukFGBT2VvGKJ9sov1lstK6/L9m/L8TIwq4iIDHPsfKN y7DWptTT7d9PA== From: Jisheng Zhang To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Vladimir Zapolskiy , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Emil Renner Berthing , Samin Guo , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thierry Reding , Jonathan Hunter , Nobuhiro Iwamatsu , Russell King , Matthias Brugger , AngeloGioacchino Del Regno , Bartosz Golaszewski Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 22/22] net: stmmac: rename stmmac_pltfr_remove_no_dt to stmmac_pltfr_remove Date: Tue, 29 Aug 2023 18:40:33 +0800 Message-Id: <20230829104033.955-23-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230829104033.955-1-jszhang@kernel.org> References: <20230829104033.955-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Now, all users of the old stmmac_pltfr_remove() are converted to the devres helper, it's time to rename stmmac_pltfr_remove_no_dt() back to stmmac_pltfr_remove() and remove the old stmmac_pltfr_remove(). Signed-off-by: Jisheng Zhang --- .../ethernet/stmicro/stmmac/dwmac-anarion.c | 2 +- .../net/ethernet/stmicro/stmmac/dwmac-imx.c | 2 +- .../ethernet/stmicro/stmmac/dwmac-ingenic.c | 2 +- .../stmicro/stmmac/dwmac-intel-plat.c | 2 +- .../ethernet/stmicro/stmmac/dwmac-ipq806x.c | 2 +- .../ethernet/stmicro/stmmac/dwmac-lpc18xx.c | 2 +- .../ethernet/stmicro/stmmac/dwmac-mediatek.c | 2 +- .../net/ethernet/stmicro/stmmac/dwmac-meson.c | 2 +- .../ethernet/stmicro/stmmac/dwmac-meson8b.c | 2 +- .../ethernet/stmicro/stmmac/dwmac-socfpga.c | 2 +- .../ethernet/stmicro/stmmac/dwmac-starfive.c | 2 +- .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 +- .../net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 2 +- .../net/ethernet/stmicro/stmmac/dwmac-tegra.c | 2 +- .../ethernet/stmicro/stmmac/dwmac-visconti.c | 2 +- .../ethernet/stmicro/stmmac/stmmac_platform.c | 23 +++---------------- .../ethernet/stmicro/stmmac/stmmac_platform.h | 1 - 17 files changed, 18 insertions(+), 36 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c b/drivers/= net/ethernet/stmicro/stmmac/dwmac-anarion.c index 0df3a2ad0986..643ee6d8d4dd 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c @@ -135,7 +135,7 @@ MODULE_DEVICE_TABLE(of, anarion_dwmac_match); =20 static struct platform_driver anarion_dwmac_driver =3D { .probe =3D anarion_dwmac_probe, - .remove_new =3D stmmac_pltfr_remove_no_dt, + .remove_new =3D stmmac_pltfr_remove, .driver =3D { .name =3D "anarion-dwmac", .pm =3D &stmmac_pltfr_pm_ops, diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c b/drivers/net/= ethernet/stmicro/stmmac/dwmac-imx.c index f4c817e9fc13..abf8cdb3c625 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c @@ -418,7 +418,7 @@ MODULE_DEVICE_TABLE(of, imx_dwmac_match); =20 static struct platform_driver imx_dwmac_driver =3D { .probe =3D imx_dwmac_probe, - .remove_new =3D stmmac_pltfr_remove_no_dt, + .remove_new =3D stmmac_pltfr_remove, .driver =3D { .name =3D "imx-dwmac", .pm =3D &stmmac_pltfr_pm_ops, diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c b/drivers/= net/ethernet/stmicro/stmmac/dwmac-ingenic.c index ddfd7af63492..21dfd9bd40ad 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c @@ -370,7 +370,7 @@ MODULE_DEVICE_TABLE(of, ingenic_mac_of_matches); =20 static struct platform_driver ingenic_mac_driver =3D { .probe =3D ingenic_mac_probe, - .remove_new =3D stmmac_pltfr_remove_no_dt, + .remove_new =3D stmmac_pltfr_remove, .driver =3D { .name =3D "ingenic-mac", .pm =3D pm_ptr(&ingenic_mac_pm_ops), diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c b/drive= rs/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c index d1aec2ca2b42..70edc5232379 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c @@ -164,7 +164,7 @@ static void intel_eth_plat_remove(struct platform_devic= e *pdev) { struct intel_dwmac *dwmac =3D get_stmmac_bsp_priv(&pdev->dev); =20 - stmmac_pltfr_remove_no_dt(pdev); + stmmac_pltfr_remove(pdev); clk_disable_unprepare(dwmac->tx_clk); } =20 diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c b/drivers/= net/ethernet/stmicro/stmmac/dwmac-ipq806x.c index a9916fd07616..281687d7083b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c @@ -487,7 +487,7 @@ MODULE_DEVICE_TABLE(of, ipq806x_gmac_dwmac_match); =20 static struct platform_driver ipq806x_gmac_dwmac_driver =3D { .probe =3D ipq806x_gmac_probe, - .remove_new =3D stmmac_pltfr_remove_no_dt, + .remove_new =3D stmmac_pltfr_remove, .driver =3D { .name =3D "ipq806x-gmac-dwmac", .pm =3D &stmmac_pltfr_pm_ops, diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c b/drivers/= net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c index 5d4936642de5..802024583d50 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c @@ -72,7 +72,7 @@ MODULE_DEVICE_TABLE(of, lpc18xx_dwmac_match); =20 static struct platform_driver lpc18xx_dwmac_driver =3D { .probe =3D lpc18xx_dwmac_probe, - .remove_new =3D stmmac_pltfr_remove_no_dt, + .remove_new =3D stmmac_pltfr_remove, .driver =3D { .name =3D "lpc18xx-dwmac", .pm =3D &stmmac_pltfr_pm_ops, diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c b/drivers= /net/ethernet/stmicro/stmmac/dwmac-mediatek.c index 1c37df6d22b3..6d6f08a6a4c7 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c @@ -683,7 +683,7 @@ static void mediatek_dwmac_remove(struct platform_devic= e *pdev) { struct mediatek_dwmac_plat_data *priv_plat =3D get_stmmac_bsp_priv(&pdev-= >dev); =20 - stmmac_pltfr_remove_no_dt(pdev); + stmmac_pltfr_remove(pdev); mediatek_dwmac_clks_config(priv_plat, false); } =20 diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c b/drivers/ne= t/ethernet/stmicro/stmmac/dwmac-meson.c index 3373d3ec2368..a16bfa9089ea 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c @@ -78,7 +78,7 @@ MODULE_DEVICE_TABLE(of, meson6_dwmac_match); =20 static struct platform_driver meson6_dwmac_driver =3D { .probe =3D meson6_dwmac_probe, - .remove_new =3D stmmac_pltfr_remove_no_dt, + .remove_new =3D stmmac_pltfr_remove, .driver =3D { .name =3D "meson6-dwmac", .pm =3D &stmmac_pltfr_pm_ops, diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/= net/ethernet/stmicro/stmmac/dwmac-meson8b.c index 37f249980929..b23944aa344e 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c @@ -520,7 +520,7 @@ MODULE_DEVICE_TABLE(of, meson8b_dwmac_match); =20 static struct platform_driver meson8b_dwmac_driver =3D { .probe =3D meson8b_dwmac_probe, - .remove_new =3D stmmac_pltfr_remove_no_dt, + .remove_new =3D stmmac_pltfr_remove, .driver =3D { .name =3D "meson8b-dwmac", .pm =3D &stmmac_pltfr_pm_ops, diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/= net/ethernet/stmicro/stmmac/dwmac-socfpga.c index 6d5e45fb54c9..aac69e2766ba 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c @@ -500,7 +500,7 @@ static void socfpga_dwmac_remove(struct platform_device= *pdev) struct stmmac_priv *priv =3D netdev_priv(ndev); struct phylink_pcs *pcs =3D priv->hw->lynx_pcs; =20 - stmmac_pltfr_remove_no_dt(pdev); + stmmac_pltfr_remove(pdev); =20 lynx_pcs_destroy(pcs); } diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c b/drivers= /net/ethernet/stmicro/stmmac/dwmac-starfive.c index 76f3a36f32c7..6096e515f877 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c @@ -152,7 +152,7 @@ MODULE_DEVICE_TABLE(of, starfive_dwmac_match); =20 static struct platform_driver starfive_dwmac_driver =3D { .probe =3D starfive_dwmac_probe, - .remove_new =3D stmmac_pltfr_remove_no_dt, + .remove_new =3D stmmac_pltfr_remove, .driver =3D { .name =3D "starfive-dwmac", .pm =3D &stmmac_pltfr_pm_ops, diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/ne= t/ethernet/stmicro/stmmac/dwmac-sun8i.c index bfe49b5a9929..d9f241b5c38c 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c @@ -1312,7 +1312,7 @@ static void sun8i_dwmac_remove(struct platform_device= *pdev) clk_put(gmac->ephy_clk); } =20 - stmmac_pltfr_remove_no_dt(pdev); + stmmac_pltfr_remove(pdev); sun8i_dwmac_unset_syscon(gmac); } =20 diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c b/drivers/ne= t/ethernet/stmicro/stmmac/dwmac-sunxi.c index b857235f5b1f..2653a9f0958c 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c @@ -172,7 +172,7 @@ MODULE_DEVICE_TABLE(of, sun7i_dwmac_match); =20 static struct platform_driver sun7i_dwmac_driver =3D { .probe =3D sun7i_gmac_probe, - .remove_new =3D stmmac_pltfr_remove_no_dt, + .remove_new =3D stmmac_pltfr_remove, .driver =3D { .name =3D "sun7i-dwmac", .pm =3D &stmmac_pltfr_pm_ops, diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c b/drivers/ne= t/ethernet/stmicro/stmmac/dwmac-tegra.c index 7e512c0762ea..362f85136c3e 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c @@ -358,7 +358,7 @@ static void tegra_mgbe_remove(struct platform_device *p= dev) =20 clk_bulk_disable_unprepare(ARRAY_SIZE(mgbe_clks), mgbe->clks); =20 - stmmac_pltfr_remove_no_dt(pdev); + stmmac_pltfr_remove(pdev); } =20 static const struct of_device_id tegra_mgbe_match[] =3D { diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c b/drivers= /net/ethernet/stmicro/stmmac/dwmac-visconti.c index 75fafd23385a..b2942fc76445 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c @@ -259,7 +259,7 @@ static void visconti_eth_dwmac_remove(struct platform_d= evice *pdev) struct net_device *ndev =3D platform_get_drvdata(pdev); struct stmmac_priv *priv =3D netdev_priv(ndev); =20 - stmmac_pltfr_remove_no_dt(pdev); + stmmac_pltfr_remove(pdev); =20 visconti_eth_clock_remove(pdev); =20 diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/driver= s/net/ethernet/stmicro/stmmac/stmmac_platform.c index ff330423ee66..4950ec2c69ce 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -808,7 +808,7 @@ static void devm_stmmac_pltfr_remove(void *data) { struct platform_device *pdev =3D data; =20 - stmmac_pltfr_remove_no_dt(pdev); + stmmac_pltfr_remove(pdev); } =20 /** @@ -835,12 +835,12 @@ int devm_stmmac_pltfr_probe(struct platform_device *p= dev, EXPORT_SYMBOL_GPL(devm_stmmac_pltfr_probe); =20 /** - * stmmac_pltfr_remove_no_dt + * stmmac_pltfr_remove * @pdev: pointer to the platform device * Description: This undoes the effects of stmmac_pltfr_probe() by removin= g the * driver and calling the platform's exit() callback. */ -void stmmac_pltfr_remove_no_dt(struct platform_device *pdev) +void stmmac_pltfr_remove(struct platform_device *pdev) { struct net_device *ndev =3D platform_get_drvdata(pdev); struct stmmac_priv *priv =3D netdev_priv(ndev); @@ -849,23 +849,6 @@ void stmmac_pltfr_remove_no_dt(struct platform_device = *pdev) stmmac_dvr_remove(&pdev->dev); stmmac_pltfr_exit(pdev, plat); } -EXPORT_SYMBOL_GPL(stmmac_pltfr_remove_no_dt); - -/** - * stmmac_pltfr_remove - * @pdev: platform device pointer - * Description: this function calls the main to free the net resources - * and calls the platforms hook and release the resources (e.g. mem). - */ -void stmmac_pltfr_remove(struct platform_device *pdev) -{ - struct net_device *ndev =3D platform_get_drvdata(pdev); - struct stmmac_priv *priv =3D netdev_priv(ndev); - struct plat_stmmacenet_data *plat =3D priv->plat; - - stmmac_pltfr_remove_no_dt(pdev); - stmmac_remove_config_dt(pdev, plat); -} EXPORT_SYMBOL_GPL(stmmac_pltfr_remove); =20 /** diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h b/driver= s/net/ethernet/stmicro/stmmac/stmmac_platform.h index c5565b2a70ac..bb07a99e1248 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h @@ -32,7 +32,6 @@ int stmmac_pltfr_probe(struct platform_device *pdev, int devm_stmmac_pltfr_probe(struct platform_device *pdev, struct plat_stmmacenet_data *plat, struct stmmac_resources *res); -void stmmac_pltfr_remove_no_dt(struct platform_device *pdev); void stmmac_pltfr_remove(struct platform_device *pdev); extern const struct dev_pm_ops stmmac_pltfr_pm_ops; =20 --=20 2.40.1