linux-phy.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/31] phy: Convert to platform remove callback returning void
@ 2023-03-07 11:58 Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 01/31] phy: allwinner: phy-sun4i-usb: " Uwe Kleine-König
                   ` (31 more replies)
  0 siblings, 32 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, Andre Przywara, Wolfram Sang, Icenowy Zheng,
	Justin Chen, Al Cooper, Pratyush Yadav, Rahul T R,
	Swapnil Jakhade, Lars-Peter Clausen, Shawn Guo, Sascha Hauer,
	Liu Ying, Yuan Can, Chun-Kuang Hu, Philipp Zabel, Chunfeng Yun,
	Matthias Brugger, Thomas Gleixner, Allison Randal,
	Greg Kroah-Hartman, Miaoqian Lin, Andy Gross, Bjorn Andersson,
	Yoshihiro Shimoda, Heiko Stuebner, Maxime Coquelin,
	Alexandre Torgue, Amelie Delaunay, Dan Carpenter, Fabrice Gasnier,
	JC Kuo, Thierry Reding, Jonathan Hunter, Roger Quadros,
	Matt Ranostay, Sinthu Raja, Vignesh Raghavendra, Tanmay Patil,
	Siddharth Vadapalli, Lv Ruyi
  Cc: linux-phy, linux-arm-kernel, linux-sunxi, kernel,
	Broadcom internal kernel review list, Fabio Estevam,
	NXP Linux Team, AngeloGioacchino Del Regno, dri-devel,
	linux-mediatek, Konrad Dybcio, linux-arm-msm, linux-renesas-soc,
	linux-rockchip, linux-stm32, linux-tegra

Hello,

this patch series adapts the platform drivers below drivers/phy to use the
.remove_new() callback. Compared to the traditional .remove() callback
.remove_new() returns no value. This is a good thing because the driver core
doesn't (and cannot) cope for errors during remove. The only effect of a
non-zero return value in .remove() is that the driver core emits a warning. The
device is removed anyhow and an early return from .remove() usually yields a
resource leak.

By changing the remove callback to return void driver authors cannot
reasonably assume any more that there is some kind of cleanup later.

All drivers in drivers/spmi returned zero unconditionally in their remove
callback, so they could all be converted trivially to .remove_new().

Note that this series depends on commit 5c5a7680e67b ("platform: Provide
a remove callback that returns no value") which is included in v6.3-rc1.

Best regards
Uwe

Uwe Kleine-König (31):
  phy: allwinner: phy-sun4i-usb: Convert to platform remove callback
    returning void
  phy: broadcom: phy-brcm-usb: Convert to platform remove callback
    returning void
  phy: cadence: cdns-dphy: Convert to platform remove callback returning
    void
  phy: cadence: phy-cadence-sierra: Convert to platform remove callback
    returning void
  phy: cadence: phy-cadence-torrent: Convert to platform remove callback
    returning void
  phy: freescale: phy-fsl-imx8qm-lvds-phy: Convert to platform remove
    callback returning void
  phy: intel: phy-intel-lgm-combo: Convert to platform remove callback
    returning void
  phy: mediatek: phy-mtk-mipi-dsi: Convert to platform remove callback
    returning void
  phy: motorola: phy-cpcap-usb: Convert to platform remove callback
    returning void
  phy: motorola: phy-mapphone-mdm6600: Convert to platform remove
    callback returning void
  phy: phy-lgm-usb: Convert to platform remove callback returning void
  phy: qualcomm: phy-qcom-apq8064-sata: Convert to platform remove
    callback returning void
  phy: qualcomm: phy-qcom-eusb2-repeater: Convert to platform remove
    callback returning void
  phy: qualcomm: phy-qcom-ipq806x-sata: Convert to platform remove
    callback returning void
  phy: renesas: phy-rcar-gen3-pcie: Convert to platform remove callback
    returning void
  phy: renesas: phy-rcar-gen3-usb2: Convert to platform remove callback
    returning void
  phy: renesas: phy-rcar-gen3-usb3: Convert to platform remove callback
    returning void
  phy: renesas: r8a779f0-ether-serdes: Convert to platform remove
    callback returning void
  phy: rockchip: phy-rockchip-inno-csidphy: Convert to platform remove
    callback returning void
  phy: rockchip: phy-rockchip-inno-dsidphy: Convert to platform remove
    callback returning void
  phy: rockchip: phy-rockchip-inno-hdmi: Convert to platform remove
    callback returning void
  phy: rockchip: phy-rockchip-typec: Convert to platform remove callback
    returning void
  phy: st: phy-stm32-usbphyc: Convert to platform remove callback
    returning void
  phy: tegra: xusb: Convert to platform remove callback returning void
  phy: ti: phy-am654-serdes: Convert to platform remove callback
    returning void
  phy: ti: phy-da8xx-usb: Convert to platform remove callback returning
    void
  phy: ti: phy-dm816x-usb: Convert to platform remove callback returning
    void
  phy: ti: phy-j721e-wiz: Convert to platform remove callback returning
    void
  phy: ti: phy-omap-usb2: Convert to platform remove callback returning
    void
  phy: ti: phy-ti-pipe3: Convert to platform remove callback returning
    void
  phy: ti: phy-twl4030-usb: Convert to platform remove callback
    returning void

 drivers/phy/allwinner/phy-sun4i-usb.c            | 6 ++----
 drivers/phy/broadcom/phy-brcm-usb.c              | 6 ++----
 drivers/phy/cadence/cdns-dphy.c                  | 6 ++----
 drivers/phy/cadence/phy-cadence-sierra.c         | 6 ++----
 drivers/phy/cadence/phy-cadence-torrent.c        | 6 ++----
 drivers/phy/freescale/phy-fsl-imx8qm-lvds-phy.c  | 6 ++----
 drivers/phy/intel/phy-intel-lgm-combo.c          | 5 ++---
 drivers/phy/mediatek/phy-mtk-mipi-dsi.c          | 5 ++---
 drivers/phy/motorola/phy-cpcap-usb.c             | 6 ++----
 drivers/phy/motorola/phy-mapphone-mdm6600.c      | 6 ++----
 drivers/phy/phy-lgm-usb.c                        | 6 ++----
 drivers/phy/qualcomm/phy-qcom-apq8064-sata.c     | 6 ++----
 drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c   | 8 +++-----
 drivers/phy/qualcomm/phy-qcom-ipq806x-sata.c     | 6 ++----
 drivers/phy/renesas/phy-rcar-gen3-pcie.c         | 6 ++----
 drivers/phy/renesas/phy-rcar-gen3-usb2.c         | 6 ++----
 drivers/phy/renesas/phy-rcar-gen3-usb3.c         | 6 ++----
 drivers/phy/renesas/r8a779f0-ether-serdes.c      | 6 ++----
 drivers/phy/rockchip/phy-rockchip-inno-csidphy.c | 6 ++----
 drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c | 6 ++----
 drivers/phy/rockchip/phy-rockchip-inno-hdmi.c    | 6 ++----
 drivers/phy/rockchip/phy-rockchip-typec.c        | 6 ++----
 drivers/phy/st/phy-stm32-usbphyc.c               | 6 ++----
 drivers/phy/tegra/xusb.c                         | 6 ++----
 drivers/phy/ti/phy-am654-serdes.c                | 6 ++----
 drivers/phy/ti/phy-da8xx-usb.c                   | 6 ++----
 drivers/phy/ti/phy-dm816x-usb.c                  | 6 ++----
 drivers/phy/ti/phy-j721e-wiz.c                   | 6 ++----
 drivers/phy/ti/phy-omap-usb2.c                   | 6 ++----
 drivers/phy/ti/phy-ti-pipe3.c                    | 6 ++----
 drivers/phy/ti/phy-twl4030-usb.c                 | 6 ++----
 31 files changed, 63 insertions(+), 123 deletions(-)

base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 01/31] phy: allwinner: phy-sun4i-usb: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-14 20:11   ` Jernej Škrabec
  2023-03-07 11:58 ` [PATCH 02/31] phy: broadcom: phy-brcm-usb: " Uwe Kleine-König
                   ` (30 subsequent siblings)
  31 siblings, 1 reply; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, Andre Przywara, Wolfram Sang, Icenowy Zheng
  Cc: linux-phy, linux-arm-kernel, linux-sunxi, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/allwinner/phy-sun4i-usb.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index fbcd7014ab43..6a74e5ce180a 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -698,7 +698,7 @@ static struct phy *sun4i_usb_phy_xlate(struct device *dev,
 	return data->phys[args->args[0]].phy;
 }
 
-static int sun4i_usb_phy_remove(struct platform_device *pdev)
+static void sun4i_usb_phy_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct sun4i_usb_phy_data *data = dev_get_drvdata(dev);
@@ -711,8 +711,6 @@ static int sun4i_usb_phy_remove(struct platform_device *pdev)
 		devm_free_irq(dev, data->vbus_det_irq, data);
 
 	cancel_delayed_work_sync(&data->detect);
-
-	return 0;
 }
 
 static const unsigned int sun4i_usb_phy0_cable[] = {
@@ -1054,7 +1052,7 @@ MODULE_DEVICE_TABLE(of, sun4i_usb_phy_of_match);
 
 static struct platform_driver sun4i_usb_phy_driver = {
 	.probe	= sun4i_usb_phy_probe,
-	.remove	= sun4i_usb_phy_remove,
+	.remove_new = sun4i_usb_phy_remove,
 	.driver = {
 		.of_match_table	= sun4i_usb_phy_of_match,
 		.name  = "sun4i-usb-phy",
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 02/31] phy: broadcom: phy-brcm-usb: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 01/31] phy: allwinner: phy-sun4i-usb: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 16:56   ` Florian Fainelli
  2023-03-07 11:58 ` [PATCH 03/31] phy: cadence: cdns-dphy: " Uwe Kleine-König
                   ` (29 subsequent siblings)
  31 siblings, 1 reply; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Justin Chen, Al Cooper, Vinod Koul, Kishon Vijay Abraham I
  Cc: Broadcom internal kernel review list, kernel, linux-phy

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/broadcom/phy-brcm-usb.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/broadcom/phy-brcm-usb.c b/drivers/phy/broadcom/phy-brcm-usb.c
index 4de39999f43d..a4cfb777dd83 100644
--- a/drivers/phy/broadcom/phy-brcm-usb.c
+++ b/drivers/phy/broadcom/phy-brcm-usb.c
@@ -572,14 +572,12 @@ static int brcm_usb_phy_probe(struct platform_device *pdev)
 	return PTR_ERR_OR_ZERO(phy_provider);
 }
 
-static int brcm_usb_phy_remove(struct platform_device *pdev)
+static void brcm_usb_phy_remove(struct platform_device *pdev)
 {
 	struct brcm_usb_phy_data *priv = dev_get_drvdata(&pdev->dev);
 
 	sysfs_remove_group(&pdev->dev.kobj, &brcm_usb_phy_group);
 	unregister_pm_notifier(&priv->pm_notifier);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -670,7 +668,7 @@ MODULE_DEVICE_TABLE(of, brcm_usb_dt_ids);
 
 static struct platform_driver brcm_usb_driver = {
 	.probe		= brcm_usb_phy_probe,
-	.remove		= brcm_usb_phy_remove,
+	.remove_new	= brcm_usb_phy_remove,
 	.driver		= {
 		.name	= "brcmstb-usb-phy",
 		.pm = &brcm_usb_phy_pm_ops,
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 03/31] phy: cadence: cdns-dphy: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 01/31] phy: allwinner: phy-sun4i-usb: " Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 02/31] phy: broadcom: phy-brcm-usb: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 04/31] phy: cadence: phy-cadence-sierra: " Uwe Kleine-König
                   ` (28 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Pratyush Yadav, Rahul T R
  Cc: linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/cadence/cdns-dphy.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/cadence/cdns-dphy.c b/drivers/phy/cadence/cdns-dphy.c
index 3dfdfb33cd0a..6e58012b6488 100644
--- a/drivers/phy/cadence/cdns-dphy.c
+++ b/drivers/phy/cadence/cdns-dphy.c
@@ -456,14 +456,12 @@ static int cdns_dphy_probe(struct platform_device *pdev)
 	return PTR_ERR_OR_ZERO(phy_provider);
 }
 
-static int cdns_dphy_remove(struct platform_device *pdev)
+static void cdns_dphy_remove(struct platform_device *pdev)
 {
 	struct cdns_dphy *dphy = dev_get_drvdata(&pdev->dev);
 
 	if (dphy->ops->remove)
 		dphy->ops->remove(dphy);
-
-	return 0;
 }
 
 static const struct of_device_id cdns_dphy_of_match[] = {
@@ -475,7 +473,7 @@ MODULE_DEVICE_TABLE(of, cdns_dphy_of_match);
 
 static struct platform_driver cdns_dphy_platform_driver = {
 	.probe		= cdns_dphy_probe,
-	.remove		= cdns_dphy_remove,
+	.remove_new	= cdns_dphy_remove,
 	.driver		= {
 		.name		= "cdns-mipi-dphy",
 		.of_match_table	= cdns_dphy_of_match,
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 04/31] phy: cadence: phy-cadence-sierra: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (2 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 03/31] phy: cadence: cdns-dphy: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 05/31] phy: cadence: phy-cadence-torrent: " Uwe Kleine-König
                   ` (27 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Swapnil Jakhade,
	Lars-Peter Clausen
  Cc: linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/cadence/phy-cadence-sierra.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c
index 6e86a6517f37..294d59b9eaed 100644
--- a/drivers/phy/cadence/phy-cadence-sierra.c
+++ b/drivers/phy/cadence/phy-cadence-sierra.c
@@ -1513,7 +1513,7 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int cdns_sierra_phy_remove(struct platform_device *pdev)
+static void cdns_sierra_phy_remove(struct platform_device *pdev)
 {
 	struct cdns_sierra_phy *phy = platform_get_drvdata(pdev);
 	int i;
@@ -1533,8 +1533,6 @@ static int cdns_sierra_phy_remove(struct platform_device *pdev)
 	}
 
 	cdns_sierra_clk_unregister(phy);
-
-	return 0;
 }
 
 /* QSGMII PHY PMA lane configuration */
@@ -2520,7 +2518,7 @@ MODULE_DEVICE_TABLE(of, cdns_sierra_id_table);
 
 static struct platform_driver cdns_sierra_driver = {
 	.probe		= cdns_sierra_phy_probe,
-	.remove		= cdns_sierra_phy_remove,
+	.remove_new	= cdns_sierra_phy_remove,
 	.driver		= {
 		.name	= "cdns-sierra-phy",
 		.of_match_table = cdns_sierra_id_table,
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 05/31] phy: cadence: phy-cadence-torrent: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (3 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 04/31] phy: cadence: phy-cadence-sierra: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 06/31] phy: freescale: phy-fsl-imx8qm-lvds-phy: " Uwe Kleine-König
                   ` (26 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Lars-Peter Clausen; +Cc: linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/cadence/phy-cadence-torrent.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadence/phy-cadence-torrent.c
index f099053c583c..3831f596d50c 100644
--- a/drivers/phy/cadence/phy-cadence-torrent.c
+++ b/drivers/phy/cadence/phy-cadence-torrent.c
@@ -2777,7 +2777,7 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int cdns_torrent_phy_remove(struct platform_device *pdev)
+static void cdns_torrent_phy_remove(struct platform_device *pdev)
 {
 	struct cdns_torrent_phy *cdns_phy = platform_get_drvdata(pdev);
 	int i;
@@ -2791,8 +2791,6 @@ static int cdns_torrent_phy_remove(struct platform_device *pdev)
 
 	clk_disable_unprepare(cdns_phy->clk);
 	cdns_torrent_clk_cleanup(cdns_phy);
-
-	return 0;
 }
 
 /* Single DisplayPort(DP) link configuration */
@@ -4708,7 +4706,7 @@ MODULE_DEVICE_TABLE(of, cdns_torrent_phy_of_match);
 
 static struct platform_driver cdns_torrent_phy_driver = {
 	.probe	= cdns_torrent_phy_probe,
-	.remove = cdns_torrent_phy_remove,
+	.remove_new = cdns_torrent_phy_remove,
 	.driver = {
 		.name	= "cdns-torrent-phy",
 		.of_match_table	= cdns_torrent_phy_of_match,
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 06/31] phy: freescale: phy-fsl-imx8qm-lvds-phy: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (4 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 05/31] phy: cadence: phy-cadence-torrent: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 07/31] phy: intel: phy-intel-lgm-combo: " Uwe Kleine-König
                   ` (25 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Shawn Guo, Sascha Hauer,
	Liu Ying
  Cc: Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team, linux-phy,
	linux-arm-kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/freescale/phy-fsl-imx8qm-lvds-phy.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/freescale/phy-fsl-imx8qm-lvds-phy.c b/drivers/phy/freescale/phy-fsl-imx8qm-lvds-phy.c
index e514b64bfdab..0ae052df3765 100644
--- a/drivers/phy/freescale/phy-fsl-imx8qm-lvds-phy.c
+++ b/drivers/phy/freescale/phy-fsl-imx8qm-lvds-phy.c
@@ -391,11 +391,9 @@ static int mixel_lvds_phy_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int mixel_lvds_phy_remove(struct platform_device *pdev)
+static void mixel_lvds_phy_remove(struct platform_device *pdev)
 {
 	pm_runtime_disable(&pdev->dev);
-
-	return 0;
 }
 
 static int __maybe_unused mixel_lvds_phy_runtime_suspend(struct device *dev)
@@ -436,7 +434,7 @@ MODULE_DEVICE_TABLE(of, mixel_lvds_phy_of_match);
 
 static struct platform_driver mixel_lvds_phy_driver = {
 	.probe	= mixel_lvds_phy_probe,
-	.remove	= mixel_lvds_phy_remove,
+	.remove_new = mixel_lvds_phy_remove,
 	.driver = {
 		.pm = &mixel_lvds_phy_pm_ops,
 		.name = "mixel-lvds-phy",
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 07/31] phy: intel: phy-intel-lgm-combo: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (5 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 06/31] phy: freescale: phy-fsl-imx8qm-lvds-phy: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 08/31] phy: mediatek: phy-mtk-mipi-dsi: " Uwe Kleine-König
                   ` (24 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Yuan Can; +Cc: linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/intel/phy-intel-lgm-combo.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/phy/intel/phy-intel-lgm-combo.c b/drivers/phy/intel/phy-intel-lgm-combo.c
index 6010e246d52e..c49f37e7b75d 100644
--- a/drivers/phy/intel/phy-intel-lgm-combo.c
+++ b/drivers/phy/intel/phy-intel-lgm-combo.c
@@ -589,13 +589,12 @@ static int intel_cbphy_probe(struct platform_device *pdev)
 	return intel_cbphy_create(cbphy);
 }
 
-static int intel_cbphy_remove(struct platform_device *pdev)
+static void intel_cbphy_remove(struct platform_device *pdev)
 {
 	struct intel_combo_phy *cbphy = platform_get_drvdata(pdev);
 
 	intel_cbphy_rst_assert(cbphy);
 	clk_disable_unprepare(cbphy->core_clk);
-	return 0;
 }
 
 static const struct of_device_id of_intel_cbphy_match[] = {
@@ -606,7 +605,7 @@ static const struct of_device_id of_intel_cbphy_match[] = {
 
 static struct platform_driver intel_cbphy_driver = {
 	.probe = intel_cbphy_probe,
-	.remove = intel_cbphy_remove,
+	.remove_new = intel_cbphy_remove,
 	.driver = {
 		.name = "intel-combo-phy",
 		.of_match_table = of_intel_cbphy_match,
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 08/31] phy: mediatek: phy-mtk-mipi-dsi: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (6 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 07/31] phy: intel: phy-intel-lgm-combo: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 09/31] phy: motorola: phy-cpcap-usb: " Uwe Kleine-König
                   ` (23 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Chun-Kuang Hu, Philipp Zabel, Chunfeng Yun, Vinod Koul,
	Kishon Vijay Abraham I, Matthias Brugger
  Cc: AngeloGioacchino Del Regno, dri-devel, linux-mediatek,
	linux-arm-kernel, linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/mediatek/phy-mtk-mipi-dsi.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c
index cf9c386385bb..526c05a4af5e 100644
--- a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c
+++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c
@@ -180,10 +180,9 @@ static int mtk_mipi_tx_probe(struct platform_device *pdev)
 				   mipi_tx->pll);
 }
 
-static int mtk_mipi_tx_remove(struct platform_device *pdev)
+static void mtk_mipi_tx_remove(struct platform_device *pdev)
 {
 	of_clk_del_provider(pdev->dev.of_node);
-	return 0;
 }
 
 static const struct of_device_id mtk_mipi_tx_match[] = {
@@ -199,7 +198,7 @@ MODULE_DEVICE_TABLE(of, mtk_mipi_tx_match);
 
 static struct platform_driver mtk_mipi_tx_driver = {
 	.probe = mtk_mipi_tx_probe,
-	.remove = mtk_mipi_tx_remove,
+	.remove_new = mtk_mipi_tx_remove,
 	.driver = {
 		.name = "mediatek-mipi-tx",
 		.of_match_table = mtk_mipi_tx_match,
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 09/31] phy: motorola: phy-cpcap-usb: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (7 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 08/31] phy: mediatek: phy-mtk-mipi-dsi: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 10/31] phy: motorola: phy-mapphone-mdm6600: " Uwe Kleine-König
                   ` (22 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Thomas Gleixner,
	Allison Randal, Greg Kroah-Hartman
  Cc: linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/motorola/phy-cpcap-usb.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/motorola/phy-cpcap-usb.c b/drivers/phy/motorola/phy-cpcap-usb.c
index 2f8210167b77..74333e814221 100644
--- a/drivers/phy/motorola/phy-cpcap-usb.c
+++ b/drivers/phy/motorola/phy-cpcap-usb.c
@@ -692,7 +692,7 @@ static int cpcap_usb_phy_probe(struct platform_device *pdev)
 	return error;
 }
 
-static int cpcap_usb_phy_remove(struct platform_device *pdev)
+static void cpcap_usb_phy_remove(struct platform_device *pdev)
 {
 	struct cpcap_phy_ddata *ddata = platform_get_drvdata(pdev);
 	int error;
@@ -707,13 +707,11 @@ static int cpcap_usb_phy_remove(struct platform_device *pdev)
 	usb_remove_phy(&ddata->phy);
 	cancel_delayed_work_sync(&ddata->detect_work);
 	regulator_disable(ddata->vusb);
-
-	return 0;
 }
 
 static struct platform_driver cpcap_usb_phy_driver = {
 	.probe		= cpcap_usb_phy_probe,
-	.remove		= cpcap_usb_phy_remove,
+	.remove_new	= cpcap_usb_phy_remove,
 	.driver		= {
 		.name	= "cpcap-usb-phy",
 		.of_match_table = of_match_ptr(cpcap_usb_phy_id_table),
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 10/31] phy: motorola: phy-mapphone-mdm6600: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (8 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 09/31] phy: motorola: phy-cpcap-usb: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 11/31] phy: phy-lgm-usb: " Uwe Kleine-König
                   ` (21 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Miaoqian Lin; +Cc: linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/motorola/phy-mapphone-mdm6600.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/motorola/phy-mapphone-mdm6600.c b/drivers/phy/motorola/phy-mapphone-mdm6600.c
index 3cd4d51c247c..1d567604b650 100644
--- a/drivers/phy/motorola/phy-mapphone-mdm6600.c
+++ b/drivers/phy/motorola/phy-mapphone-mdm6600.c
@@ -634,7 +634,7 @@ static int phy_mdm6600_probe(struct platform_device *pdev)
 	return error;
 }
 
-static int phy_mdm6600_remove(struct platform_device *pdev)
+static void phy_mdm6600_remove(struct platform_device *pdev)
 {
 	struct phy_mdm6600 *ddata = platform_get_drvdata(pdev);
 	struct gpio_desc *reset_gpio = ddata->ctrl_gpios[PHY_MDM6600_RESET];
@@ -653,13 +653,11 @@ static int phy_mdm6600_remove(struct platform_device *pdev)
 	cancel_delayed_work_sync(&ddata->modem_wake_work);
 	cancel_delayed_work_sync(&ddata->bootup_work);
 	cancel_delayed_work_sync(&ddata->status_work);
-
-	return 0;
 }
 
 static struct platform_driver phy_mdm6600_driver = {
 	.probe = phy_mdm6600_probe,
-	.remove = phy_mdm6600_remove,
+	.remove_new = phy_mdm6600_remove,
 	.driver = {
 		.name = "phy-mapphone-mdm6600",
 		.pm = &phy_mdm6600_pm_ops,
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 11/31] phy: phy-lgm-usb: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (9 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 10/31] phy: motorola: phy-mapphone-mdm6600: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 12/31] phy: qualcomm: phy-qcom-apq8064-sata: " Uwe Kleine-König
                   ` (20 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I; +Cc: linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/phy-lgm-usb.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/phy-lgm-usb.c b/drivers/phy/phy-lgm-usb.c
index 309c8f0e0724..410729c7f513 100644
--- a/drivers/phy/phy-lgm-usb.c
+++ b/drivers/phy/phy-lgm-usb.c
@@ -252,13 +252,11 @@ static int phy_probe(struct platform_device *pdev)
 	return usb_add_phy_dev(phy);
 }
 
-static int phy_remove(struct platform_device *pdev)
+static void phy_remove(struct platform_device *pdev)
 {
 	struct tca_apb *ta = platform_get_drvdata(pdev);
 
 	usb_remove_phy(&ta->phy);
-
-	return 0;
 }
 
 static const struct of_device_id intel_usb_phy_dt_ids[] = {
@@ -273,7 +271,7 @@ static struct platform_driver lgm_phy_driver = {
 		.of_match_table = intel_usb_phy_dt_ids,
 	},
 	.probe = phy_probe,
-	.remove = phy_remove,
+	.remove_new = phy_remove,
 };
 
 module_platform_driver(lgm_phy_driver);
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 12/31] phy: qualcomm: phy-qcom-apq8064-sata: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (10 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 11/31] phy: phy-lgm-usb: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 13/31] phy: qualcomm: phy-qcom-eusb2-repeater: " Uwe Kleine-König
                   ` (19 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Vinod Koul, Kishon Vijay Abraham I
  Cc: Konrad Dybcio, linux-arm-msm, linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/qualcomm/phy-qcom-apq8064-sata.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c b/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c
index d437a249cd73..8814f4322adf 100644
--- a/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c
+++ b/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c
@@ -243,13 +243,11 @@ static int qcom_apq8064_sata_phy_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int qcom_apq8064_sata_phy_remove(struct platform_device *pdev)
+static void qcom_apq8064_sata_phy_remove(struct platform_device *pdev)
 {
 	struct qcom_apq8064_sata_phy *phy = platform_get_drvdata(pdev);
 
 	clk_disable_unprepare(phy->cfg_clk);
-
-	return 0;
 }
 
 static const struct of_device_id qcom_apq8064_sata_phy_of_match[] = {
@@ -260,7 +258,7 @@ MODULE_DEVICE_TABLE(of, qcom_apq8064_sata_phy_of_match);
 
 static struct platform_driver qcom_apq8064_sata_phy_driver = {
 	.probe	= qcom_apq8064_sata_phy_probe,
-	.remove	= qcom_apq8064_sata_phy_remove,
+	.remove_new = qcom_apq8064_sata_phy_remove,
 	.driver = {
 		.name	= "qcom-apq8064-sata-phy",
 		.of_match_table	= qcom_apq8064_sata_phy_of_match,
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 13/31] phy: qualcomm: phy-qcom-eusb2-repeater: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (11 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 12/31] phy: qualcomm: phy-qcom-apq8064-sata: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 14/31] phy: qualcomm: phy-qcom-ipq806x-sata: " Uwe Kleine-König
                   ` (18 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Vinod Koul, Kishon Vijay Abraham I
  Cc: Konrad Dybcio, linux-arm-msm, linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
index 3f265ac2df20..90f8543ba265 100644
--- a/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
+++ b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
@@ -223,16 +223,14 @@ static int eusb2_repeater_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int eusb2_repeater_remove(struct platform_device *pdev)
+static void eusb2_repeater_remove(struct platform_device *pdev)
 {
 	struct eusb2_repeater *rptr = platform_get_drvdata(pdev);
 
 	if (!rptr)
-		return 0;
+		return;
 
 	eusb2_repeater_exit(rptr->phy);
-
-	return 0;
 }
 
 static const struct of_device_id eusb2_repeater_of_match_table[] = {
@@ -246,7 +244,7 @@ MODULE_DEVICE_TABLE(of, eusb2_repeater_of_match_table);
 
 static struct platform_driver eusb2_repeater_driver = {
 	.probe		= eusb2_repeater_probe,
-	.remove		= eusb2_repeater_remove,
+	.remove_new	= eusb2_repeater_remove,
 	.driver = {
 		.name	= "qcom-eusb2-repeater",
 		.of_match_table = eusb2_repeater_of_match_table,
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 14/31] phy: qualcomm: phy-qcom-ipq806x-sata: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (12 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 13/31] phy: qualcomm: phy-qcom-eusb2-repeater: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 15/31] phy: renesas: phy-rcar-gen3-pcie: " Uwe Kleine-König
                   ` (17 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Vinod Koul, Kishon Vijay Abraham I
  Cc: Konrad Dybcio, linux-arm-msm, linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/qualcomm/phy-qcom-ipq806x-sata.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-ipq806x-sata.c b/drivers/phy/qualcomm/phy-qcom-ipq806x-sata.c
index 0fc2a1ed39b3..f0a72b82c770 100644
--- a/drivers/phy/qualcomm/phy-qcom-ipq806x-sata.c
+++ b/drivers/phy/qualcomm/phy-qcom-ipq806x-sata.c
@@ -170,13 +170,11 @@ static int qcom_ipq806x_sata_phy_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int qcom_ipq806x_sata_phy_remove(struct platform_device *pdev)
+static void qcom_ipq806x_sata_phy_remove(struct platform_device *pdev)
 {
 	struct qcom_ipq806x_sata_phy *phy = platform_get_drvdata(pdev);
 
 	clk_disable_unprepare(phy->cfg_clk);
-
-	return 0;
 }
 
 static const struct of_device_id qcom_ipq806x_sata_phy_of_match[] = {
@@ -187,7 +185,7 @@ MODULE_DEVICE_TABLE(of, qcom_ipq806x_sata_phy_of_match);
 
 static struct platform_driver qcom_ipq806x_sata_phy_driver = {
 	.probe	= qcom_ipq806x_sata_phy_probe,
-	.remove	= qcom_ipq806x_sata_phy_remove,
+	.remove_new = qcom_ipq806x_sata_phy_remove,
 	.driver = {
 		.name	= "qcom-ipq806x-sata-phy",
 		.of_match_table	= qcom_ipq806x_sata_phy_of_match,
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 15/31] phy: renesas: phy-rcar-gen3-pcie: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (13 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 14/31] phy: qualcomm: phy-qcom-ipq806x-sata: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 16/31] phy: renesas: phy-rcar-gen3-usb2: " Uwe Kleine-König
                   ` (16 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I; +Cc: linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/renesas/phy-rcar-gen3-pcie.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/renesas/phy-rcar-gen3-pcie.c b/drivers/phy/renesas/phy-rcar-gen3-pcie.c
index 4dc721eb9577..9cf786a7daac 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-pcie.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-pcie.c
@@ -126,11 +126,9 @@ static int rcar_gen3_phy_pcie_probe(struct platform_device *pdev)
 	return error;
 }
 
-static int rcar_gen3_phy_pcie_remove(struct platform_device *pdev)
+static void rcar_gen3_phy_pcie_remove(struct platform_device *pdev)
 {
 	pm_runtime_disable(&pdev->dev);
-
-	return 0;
 };
 
 static struct platform_driver rcar_gen3_phy_driver = {
@@ -139,7 +137,7 @@ static struct platform_driver rcar_gen3_phy_driver = {
 		.of_match_table	= rcar_gen3_phy_pcie_match_table,
 	},
 	.probe	= rcar_gen3_phy_pcie_probe,
-	.remove = rcar_gen3_phy_pcie_remove,
+	.remove_new = rcar_gen3_phy_pcie_remove,
 };
 
 module_platform_driver(rcar_gen3_phy_driver);
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 16/31] phy: renesas: phy-rcar-gen3-usb2: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (14 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 15/31] phy: renesas: phy-rcar-gen3-pcie: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 13:35   ` Geert Uytterhoeven
  2023-03-07 11:58 ` [PATCH 17/31] phy: renesas: phy-rcar-gen3-usb3: " Uwe Kleine-König
                   ` (15 subsequent siblings)
  31 siblings, 1 reply; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Yoshihiro Shimoda, Vinod Koul, Kishon Vijay Abraham I
  Cc: linux-renesas-soc, linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/renesas/phy-rcar-gen3-usb2.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
index 9de617ca9daa..d4e2ee7e4efb 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -755,7 +755,7 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int rcar_gen3_phy_usb2_remove(struct platform_device *pdev)
+static void rcar_gen3_phy_usb2_remove(struct platform_device *pdev)
 {
 	struct rcar_gen3_chan *channel = platform_get_drvdata(pdev);
 
@@ -763,8 +763,6 @@ static int rcar_gen3_phy_usb2_remove(struct platform_device *pdev)
 		device_remove_file(&pdev->dev, &dev_attr_role);
 
 	pm_runtime_disable(&pdev->dev);
-
-	return 0;
 };
 
 static struct platform_driver rcar_gen3_phy_usb2_driver = {
@@ -773,7 +771,7 @@ static struct platform_driver rcar_gen3_phy_usb2_driver = {
 		.of_match_table	= rcar_gen3_phy_usb2_match_table,
 	},
 	.probe	= rcar_gen3_phy_usb2_probe,
-	.remove = rcar_gen3_phy_usb2_remove,
+	.remove_new = rcar_gen3_phy_usb2_remove,
 };
 module_platform_driver(rcar_gen3_phy_usb2_driver);
 
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 17/31] phy: renesas: phy-rcar-gen3-usb3: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (15 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 16/31] phy: renesas: phy-rcar-gen3-usb2: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 13:36   ` Geert Uytterhoeven
  2023-03-07 11:58 ` [PATCH 18/31] phy: renesas: r8a779f0-ether-serdes: " Uwe Kleine-König
                   ` (14 subsequent siblings)
  31 siblings, 1 reply; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Yoshihiro Shimoda, Vinod Koul, Kishon Vijay Abraham I
  Cc: linux-renesas-soc, linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/renesas/phy-rcar-gen3-usb3.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb3.c b/drivers/phy/renesas/phy-rcar-gen3-usb3.c
index f27d6f471629..e2d630edd992 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb3.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb3.c
@@ -199,11 +199,9 @@ static int rcar_gen3_phy_usb3_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int rcar_gen3_phy_usb3_remove(struct platform_device *pdev)
+static void rcar_gen3_phy_usb3_remove(struct platform_device *pdev)
 {
 	pm_runtime_disable(&pdev->dev);
-
-	return 0;
 };
 
 static struct platform_driver rcar_gen3_phy_usb3_driver = {
@@ -212,7 +210,7 @@ static struct platform_driver rcar_gen3_phy_usb3_driver = {
 		.of_match_table	= rcar_gen3_phy_usb3_match_table,
 	},
 	.probe	= rcar_gen3_phy_usb3_probe,
-	.remove = rcar_gen3_phy_usb3_remove,
+	.remove_new = rcar_gen3_phy_usb3_remove,
 };
 module_platform_driver(rcar_gen3_phy_usb3_driver);
 
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 18/31] phy: renesas: r8a779f0-ether-serdes: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (16 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 17/31] phy: renesas: phy-rcar-gen3-usb3: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 19/31] phy: rockchip: phy-rockchip-inno-csidphy: " Uwe Kleine-König
                   ` (13 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Yoshihiro Shimoda; +Cc: linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/renesas/r8a779f0-ether-serdes.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/renesas/r8a779f0-ether-serdes.c b/drivers/phy/renesas/r8a779f0-ether-serdes.c
index c5206ef9195b..55b7bdfc10d3 100644
--- a/drivers/phy/renesas/r8a779f0-ether-serdes.c
+++ b/drivers/phy/renesas/r8a779f0-ether-serdes.c
@@ -388,19 +388,17 @@ static int r8a779f0_eth_serdes_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int r8a779f0_eth_serdes_remove(struct platform_device *pdev)
+static void r8a779f0_eth_serdes_remove(struct platform_device *pdev)
 {
 	pm_runtime_put(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
 
 	platform_set_drvdata(pdev, NULL);
-
-	return 0;
 }
 
 static struct platform_driver r8a779f0_eth_serdes_driver_platform = {
 	.probe = r8a779f0_eth_serdes_probe,
-	.remove = r8a779f0_eth_serdes_remove,
+	.remove_new = r8a779f0_eth_serdes_remove,
 	.driver = {
 		.name = "r8a779f0_eth_serdes",
 		.of_match_table = r8a779f0_eth_serdes_of_table,
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 19/31] phy: rockchip: phy-rockchip-inno-csidphy: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (17 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 18/31] phy: renesas: r8a779f0-ether-serdes: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 12:02   ` Heiko Stübner
  2023-03-07 11:58 ` [PATCH 20/31] phy: rockchip: phy-rockchip-inno-dsidphy: " Uwe Kleine-König
                   ` (12 subsequent siblings)
  31 siblings, 1 reply; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Heiko Stuebner
  Cc: linux-phy, linux-arm-kernel, linux-rockchip, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/rockchip/phy-rockchip-inno-csidphy.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/rockchip/phy-rockchip-inno-csidphy.c b/drivers/phy/rockchip/phy-rockchip-inno-csidphy.c
index 75f948bdea6a..98c92d6c482f 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-csidphy.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-csidphy.c
@@ -459,13 +459,11 @@ static int rockchip_inno_csidphy_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int rockchip_inno_csidphy_remove(struct platform_device *pdev)
+static void rockchip_inno_csidphy_remove(struct platform_device *pdev)
 {
 	struct rockchip_inno_csidphy *priv = platform_get_drvdata(pdev);
 
 	pm_runtime_disable(priv->dev);
-
-	return 0;
 }
 
 static struct platform_driver rockchip_inno_csidphy_driver = {
@@ -474,7 +472,7 @@ static struct platform_driver rockchip_inno_csidphy_driver = {
 		.of_match_table = rockchip_inno_csidphy_match_id,
 	},
 	.probe = rockchip_inno_csidphy_probe,
-	.remove = rockchip_inno_csidphy_remove,
+	.remove_new = rockchip_inno_csidphy_remove,
 };
 
 module_platform_driver(rockchip_inno_csidphy_driver);
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 20/31] phy: rockchip: phy-rockchip-inno-dsidphy: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (18 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 19/31] phy: rockchip: phy-rockchip-inno-csidphy: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 12:02   ` Heiko Stübner
  2023-03-07 11:58 ` [PATCH 21/31] phy: rockchip: phy-rockchip-inno-hdmi: " Uwe Kleine-König
                   ` (11 subsequent siblings)
  31 siblings, 1 reply; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Heiko Stuebner
  Cc: linux-phy, linux-arm-kernel, linux-rockchip, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
index 2c5847faff63..726928ff1273 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
@@ -755,13 +755,11 @@ static int inno_dsidphy_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int inno_dsidphy_remove(struct platform_device *pdev)
+static void inno_dsidphy_remove(struct platform_device *pdev)
 {
 	struct inno_dsidphy *inno = platform_get_drvdata(pdev);
 
 	pm_runtime_disable(inno->dev);
-
-	return 0;
 }
 
 static const struct of_device_id inno_dsidphy_of_match[] = {
@@ -788,7 +786,7 @@ static struct platform_driver inno_dsidphy_driver = {
 		.of_match_table	= of_match_ptr(inno_dsidphy_of_match),
 	},
 	.probe = inno_dsidphy_probe,
-	.remove = inno_dsidphy_remove,
+	.remove_new = inno_dsidphy_remove,
 };
 module_platform_driver(inno_dsidphy_driver);
 
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 21/31] phy: rockchip: phy-rockchip-inno-hdmi: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (19 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 20/31] phy: rockchip: phy-rockchip-inno-dsidphy: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 12:02   ` Heiko Stübner
  2023-03-07 11:58 ` [PATCH 22/31] phy: rockchip: phy-rockchip-typec: " Uwe Kleine-König
                   ` (10 subsequent siblings)
  31 siblings, 1 reply; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Heiko Stuebner
  Cc: linux-phy, linux-arm-kernel, linux-rockchip, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/rockchip/phy-rockchip-inno-hdmi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
index 80acca4e9e14..1e1563f5fffc 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
@@ -1246,11 +1246,9 @@ static int inno_hdmi_phy_probe(struct platform_device *pdev)
 	return PTR_ERR_OR_ZERO(phy_provider);
 }
 
-static int inno_hdmi_phy_remove(struct platform_device *pdev)
+static void inno_hdmi_phy_remove(struct platform_device *pdev)
 {
 	of_clk_del_provider(pdev->dev.of_node);
-
-	return 0;
 }
 
 static const struct of_device_id inno_hdmi_phy_of_match[] = {
@@ -1266,7 +1264,7 @@ MODULE_DEVICE_TABLE(of, inno_hdmi_phy_of_match);
 
 static struct platform_driver inno_hdmi_phy_driver = {
 	.probe  = inno_hdmi_phy_probe,
-	.remove = inno_hdmi_phy_remove,
+	.remove_new = inno_hdmi_phy_remove,
 	.driver = {
 		.name = "inno-hdmi-phy",
 		.of_match_table = inno_hdmi_phy_of_match,
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 22/31] phy: rockchip: phy-rockchip-typec: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (20 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 21/31] phy: rockchip: phy-rockchip-inno-hdmi: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 12:02   ` Heiko Stübner
  2023-03-07 11:58 ` [PATCH 23/31] phy: st: phy-stm32-usbphyc: " Uwe Kleine-König
                   ` (9 subsequent siblings)
  31 siblings, 1 reply; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Heiko Stuebner
  Cc: linux-phy, linux-arm-kernel, linux-rockchip, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/rockchip/phy-rockchip-typec.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c b/drivers/phy/rockchip/phy-rockchip-typec.c
index 39db8acde61a..8b1667be4915 100644
--- a/drivers/phy/rockchip/phy-rockchip-typec.c
+++ b/drivers/phy/rockchip/phy-rockchip-typec.c
@@ -1194,11 +1194,9 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int rockchip_typec_phy_remove(struct platform_device *pdev)
+static void rockchip_typec_phy_remove(struct platform_device *pdev)
 {
 	pm_runtime_disable(&pdev->dev);
-
-	return 0;
 }
 
 static const struct of_device_id rockchip_typec_phy_dt_ids[] = {
@@ -1213,7 +1211,7 @@ MODULE_DEVICE_TABLE(of, rockchip_typec_phy_dt_ids);
 
 static struct platform_driver rockchip_typec_phy_driver = {
 	.probe		= rockchip_typec_phy_probe,
-	.remove		= rockchip_typec_phy_remove,
+	.remove_new	= rockchip_typec_phy_remove,
 	.driver		= {
 		.name	= "rockchip-typec-phy",
 		.of_match_table = rockchip_typec_phy_dt_ids,
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 23/31] phy: st: phy-stm32-usbphyc: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (21 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 22/31] phy: rockchip: phy-rockchip-typec: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 24/31] phy: tegra: xusb: " Uwe Kleine-König
                   ` (8 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Maxime Coquelin,
	Alexandre Torgue, Amelie Delaunay, Dan Carpenter, Fabrice Gasnier
  Cc: linux-phy, linux-stm32, linux-arm-kernel, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/st/phy-stm32-usbphyc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/st/phy-stm32-usbphyc.c b/drivers/phy/st/phy-stm32-usbphyc.c
index 5bb9647b078f..1add3b75f92f 100644
--- a/drivers/phy/st/phy-stm32-usbphyc.c
+++ b/drivers/phy/st/phy-stm32-usbphyc.c
@@ -766,7 +766,7 @@ static int stm32_usbphyc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int stm32_usbphyc_remove(struct platform_device *pdev)
+static void stm32_usbphyc_remove(struct platform_device *pdev)
 {
 	struct stm32_usbphyc *usbphyc = dev_get_drvdata(&pdev->dev);
 	int port;
@@ -779,8 +779,6 @@ static int stm32_usbphyc_remove(struct platform_device *pdev)
 	stm32_usbphyc_clk48_unregister(usbphyc);
 
 	clk_disable_unprepare(usbphyc->clk);
-
-	return 0;
 }
 
 static int __maybe_unused stm32_usbphyc_resume(struct device *dev)
@@ -810,7 +808,7 @@ MODULE_DEVICE_TABLE(of, stm32_usbphyc_of_match);
 
 static struct platform_driver stm32_usbphyc_driver = {
 	.probe = stm32_usbphyc_probe,
-	.remove = stm32_usbphyc_remove,
+	.remove_new = stm32_usbphyc_remove,
 	.driver = {
 		.of_match_table = stm32_usbphyc_of_match,
 		.name = "stm32-usbphyc",
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 24/31] phy: tegra: xusb: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (22 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 23/31] phy: st: phy-stm32-usbphyc: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 25/31] phy: ti: phy-am654-serdes: " Uwe Kleine-König
                   ` (7 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: JC Kuo, Vinod Koul, Kishon Vijay Abraham I, Thierry Reding,
	Jonathan Hunter
  Cc: linux-phy, linux-tegra, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/tegra/xusb.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
index 78045bd6c214..ec335668563d 100644
--- a/drivers/phy/tegra/xusb.c
+++ b/drivers/phy/tegra/xusb.c
@@ -1267,7 +1267,7 @@ static int tegra_xusb_padctl_probe(struct platform_device *pdev)
 	return err;
 }
 
-static int tegra_xusb_padctl_remove(struct platform_device *pdev)
+static void tegra_xusb_padctl_remove(struct platform_device *pdev)
 {
 	struct tegra_xusb_padctl *padctl = platform_get_drvdata(pdev);
 	int err;
@@ -1285,8 +1285,6 @@ static int tegra_xusb_padctl_remove(struct platform_device *pdev)
 		dev_err(&pdev->dev, "failed to assert reset: %d\n", err);
 
 	padctl->soc->ops->remove(padctl);
-
-	return 0;
 }
 
 static __maybe_unused int tegra_xusb_padctl_suspend_noirq(struct device *dev)
@@ -1321,7 +1319,7 @@ static struct platform_driver tegra_xusb_padctl_driver = {
 		.pm = &tegra_xusb_padctl_pm_ops,
 	},
 	.probe = tegra_xusb_padctl_probe,
-	.remove = tegra_xusb_padctl_remove,
+	.remove_new = tegra_xusb_padctl_remove,
 };
 module_platform_driver(tegra_xusb_padctl_driver);
 
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 25/31] phy: ti: phy-am654-serdes: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (23 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 24/31] phy: tegra: xusb: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 26/31] phy: ti: phy-da8xx-usb: " Uwe Kleine-König
                   ` (6 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Miaoqian Lin; +Cc: linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/ti/phy-am654-serdes.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/ti/phy-am654-serdes.c b/drivers/phy/ti/phy-am654-serdes.c
index 0be727bb9f79..4ed2d951d3df 100644
--- a/drivers/phy/ti/phy-am654-serdes.c
+++ b/drivers/phy/ti/phy-am654-serdes.c
@@ -842,20 +842,18 @@ static int serdes_am654_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int serdes_am654_remove(struct platform_device *pdev)
+static void serdes_am654_remove(struct platform_device *pdev)
 {
 	struct serdes_am654 *am654_phy = platform_get_drvdata(pdev);
 	struct device_node *node = am654_phy->of_node;
 
 	pm_runtime_disable(&pdev->dev);
 	of_clk_del_provider(node);
-
-	return 0;
 }
 
 static struct platform_driver serdes_am654_driver = {
 	.probe		= serdes_am654_probe,
-	.remove		= serdes_am654_remove,
+	.remove_new	= serdes_am654_remove,
 	.driver		= {
 		.name	= "phy-am654",
 		.of_match_table = serdes_am654_id_table,
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 26/31] phy: ti: phy-da8xx-usb: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (24 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 25/31] phy: ti: phy-am654-serdes: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 27/31] phy: ti: phy-dm816x-usb: " Uwe Kleine-König
                   ` (5 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I; +Cc: linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/ti/phy-da8xx-usb.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/ti/phy-da8xx-usb.c b/drivers/phy/ti/phy-da8xx-usb.c
index 83bc0a9afe12..b7a9ef3f4654 100644
--- a/drivers/phy/ti/phy-da8xx-usb.c
+++ b/drivers/phy/ti/phy-da8xx-usb.c
@@ -211,7 +211,7 @@ static int da8xx_usb_phy_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int da8xx_usb_phy_remove(struct platform_device *pdev)
+static void da8xx_usb_phy_remove(struct platform_device *pdev)
 {
 	struct da8xx_usb_phy *d_phy = platform_get_drvdata(pdev);
 
@@ -219,8 +219,6 @@ static int da8xx_usb_phy_remove(struct platform_device *pdev)
 		phy_remove_lookup(d_phy->usb20_phy, "usb-phy", "musb-da8xx");
 		phy_remove_lookup(d_phy->usb11_phy, "usb-phy", "ohci-da8xx");
 	}
-
-	return 0;
 }
 
 static const struct of_device_id da8xx_usb_phy_ids[] = {
@@ -231,7 +229,7 @@ MODULE_DEVICE_TABLE(of, da8xx_usb_phy_ids);
 
 static struct platform_driver da8xx_usb_phy_driver = {
 	.probe	= da8xx_usb_phy_probe,
-	.remove	= da8xx_usb_phy_remove,
+	.remove_new = da8xx_usb_phy_remove,
 	.driver	= {
 		.name	= "da8xx-usb-phy",
 		.of_match_table = da8xx_usb_phy_ids,
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 27/31] phy: ti: phy-dm816x-usb: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (25 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 26/31] phy: ti: phy-da8xx-usb: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 28/31] phy: ti: phy-j721e-wiz: " Uwe Kleine-König
                   ` (4 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Thomas Gleixner,
	Greg Kroah-Hartman, Allison Randal
  Cc: linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/ti/phy-dm816x-usb.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/ti/phy-dm816x-usb.c b/drivers/phy/ti/phy-dm816x-usb.c
index fb619908f912..db153a55f4e1 100644
--- a/drivers/phy/ti/phy-dm816x-usb.c
+++ b/drivers/phy/ti/phy-dm816x-usb.c
@@ -257,20 +257,18 @@ static int dm816x_usb_phy_probe(struct platform_device *pdev)
 	return error;
 }
 
-static int dm816x_usb_phy_remove(struct platform_device *pdev)
+static void dm816x_usb_phy_remove(struct platform_device *pdev)
 {
 	struct dm816x_usb_phy *phy = platform_get_drvdata(pdev);
 
 	usb_remove_phy(&phy->phy);
 	pm_runtime_disable(phy->dev);
 	clk_unprepare(phy->refclk);
-
-	return 0;
 }
 
 static struct platform_driver dm816x_usb_phy_driver = {
 	.probe		= dm816x_usb_phy_probe,
-	.remove		= dm816x_usb_phy_remove,
+	.remove_new	= dm816x_usb_phy_remove,
 	.driver		= {
 		.name	= "dm816x-usb-phy",
 		.pm	= &dm816x_usb_phy_pm_ops,
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 28/31] phy: ti: phy-j721e-wiz: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (26 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 27/31] phy: ti: phy-dm816x-usb: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 29/31] phy: ti: phy-omap-usb2: " Uwe Kleine-König
                   ` (3 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Roger Quadros, Matt Ranostay,
	Sinthu Raja, Vignesh Raghavendra, Dan Carpenter, Tanmay Patil,
	Siddharth Vadapalli
  Cc: linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/ti/phy-j721e-wiz.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c
index 1b83c98a78f0..d2fd2143450a 100644
--- a/drivers/phy/ti/phy-j721e-wiz.c
+++ b/drivers/phy/ti/phy-j721e-wiz.c
@@ -1636,7 +1636,7 @@ static int wiz_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int wiz_remove(struct platform_device *pdev)
+static void wiz_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct device_node *node = dev->of_node;
@@ -1650,13 +1650,11 @@ static int wiz_remove(struct platform_device *pdev)
 	wiz_clock_cleanup(wiz, node);
 	pm_runtime_put(dev);
 	pm_runtime_disable(dev);
-
-	return 0;
 }
 
 static struct platform_driver wiz_driver = {
 	.probe		= wiz_probe,
-	.remove		= wiz_remove,
+	.remove_new	= wiz_remove,
 	.driver		= {
 		.name	= "wiz",
 		.of_match_table = wiz_id_table,
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 29/31] phy: ti: phy-omap-usb2: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (27 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 28/31] phy: ti: phy-j721e-wiz: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:58 ` [PATCH 30/31] phy: ti: phy-ti-pipe3: " Uwe Kleine-König
                   ` (2 subsequent siblings)
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Miaoqian Lin; +Cc: linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/ti/phy-omap-usb2.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/ti/phy-omap-usb2.c b/drivers/phy/ti/phy-omap-usb2.c
index 31a775877f6e..bbe5d25b0351 100644
--- a/drivers/phy/ti/phy-omap-usb2.c
+++ b/drivers/phy/ti/phy-omap-usb2.c
@@ -506,19 +506,17 @@ static int omap_usb2_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int omap_usb2_remove(struct platform_device *pdev)
+static void omap_usb2_remove(struct platform_device *pdev)
 {
 	struct omap_usb	*phy = platform_get_drvdata(pdev);
 
 	usb_remove_phy(&phy->phy);
 	pm_runtime_disable(phy->dev);
-
-	return 0;
 }
 
 static struct platform_driver omap_usb2_driver = {
 	.probe		= omap_usb2_probe,
-	.remove		= omap_usb2_remove,
+	.remove_new	= omap_usb2_remove,
 	.driver		= {
 		.name	= "omap-usb2",
 		.of_match_table = omap_usb2_id_table,
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 30/31] phy: ti: phy-ti-pipe3: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (28 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 29/31] phy: ti: phy-omap-usb2: " Uwe Kleine-König
@ 2023-03-07 11:58 ` Uwe Kleine-König
  2023-03-07 11:59 ` [PATCH 31/31] phy: ti: phy-twl4030-usb: " Uwe Kleine-König
  2023-03-20 11:38 ` [PATCH 00/31] phy: " Vinod Koul
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:58 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Lv Ruyi; +Cc: linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/ti/phy-ti-pipe3.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/ti/phy-ti-pipe3.c b/drivers/phy/ti/phy-ti-pipe3.c
index f502c36f3be5..507e1552db5e 100644
--- a/drivers/phy/ti/phy-ti-pipe3.c
+++ b/drivers/phy/ti/phy-ti-pipe3.c
@@ -841,7 +841,7 @@ static int ti_pipe3_probe(struct platform_device *pdev)
 	return PTR_ERR_OR_ZERO(phy_provider);
 }
 
-static int ti_pipe3_remove(struct platform_device *pdev)
+static void ti_pipe3_remove(struct platform_device *pdev)
 {
 	struct ti_pipe3 *phy = platform_get_drvdata(pdev);
 
@@ -850,8 +850,6 @@ static int ti_pipe3_remove(struct platform_device *pdev)
 		phy->sata_refclk_enabled = false;
 	}
 	pm_runtime_disable(&pdev->dev);
-
-	return 0;
 }
 
 static int ti_pipe3_enable_clocks(struct ti_pipe3 *phy)
@@ -928,7 +926,7 @@ MODULE_DEVICE_TABLE(of, ti_pipe3_id_table);
 
 static struct platform_driver ti_pipe3_driver = {
 	.probe		= ti_pipe3_probe,
-	.remove		= ti_pipe3_remove,
+	.remove_new	= ti_pipe3_remove,
 	.driver		= {
 		.name	= "ti-pipe3",
 		.of_match_table = ti_pipe3_id_table,
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 31/31] phy: ti: phy-twl4030-usb: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (29 preceding siblings ...)
  2023-03-07 11:58 ` [PATCH 30/31] phy: ti: phy-ti-pipe3: " Uwe Kleine-König
@ 2023-03-07 11:59 ` Uwe Kleine-König
  2023-03-20 11:38 ` [PATCH 00/31] phy: " Vinod Koul
  31 siblings, 0 replies; 42+ messages in thread
From: Uwe Kleine-König @ 2023-03-07 11:59 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I; +Cc: linux-phy, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/phy/ti/phy-twl4030-usb.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/ti/phy-twl4030-usb.c b/drivers/phy/ti/phy-twl4030-usb.c
index ac71017a0bc1..da50732625d1 100644
--- a/drivers/phy/ti/phy-twl4030-usb.c
+++ b/drivers/phy/ti/phy-twl4030-usb.c
@@ -787,7 +787,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int twl4030_usb_remove(struct platform_device *pdev)
+static void twl4030_usb_remove(struct platform_device *pdev)
 {
 	struct twl4030_usb *twl = platform_get_drvdata(pdev);
 	int val;
@@ -821,8 +821,6 @@ static int twl4030_usb_remove(struct platform_device *pdev)
 
 	/* disable complete OTG block */
 	twl4030_usb_clear_bits(twl, POWER_CTRL, POWER_CTRL_OTG_ENAB);
-
-	return 0;
 }
 
 #ifdef CONFIG_OF
@@ -835,7 +833,7 @@ MODULE_DEVICE_TABLE(of, twl4030_usb_id_table);
 
 static struct platform_driver twl4030_usb_driver = {
 	.probe		= twl4030_usb_probe,
-	.remove		= twl4030_usb_remove,
+	.remove_new	= twl4030_usb_remove,
 	.driver		= {
 		.name	= "twl4030_usb",
 		.pm	= &twl4030_usb_pm_ops,
-- 
2.39.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* Re: [PATCH 19/31] phy: rockchip: phy-rockchip-inno-csidphy: Convert to platform remove callback returning void
  2023-03-07 11:58 ` [PATCH 19/31] phy: rockchip: phy-rockchip-inno-csidphy: " Uwe Kleine-König
@ 2023-03-07 12:02   ` Heiko Stübner
  0 siblings, 0 replies; 42+ messages in thread
From: Heiko Stübner @ 2023-03-07 12:02 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Uwe Kleine-König
  Cc: linux-phy, linux-arm-kernel, linux-rockchip, kernel

Am Dienstag, 7. März 2023, 12:58:48 CET schrieb Uwe Kleine-König:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Heiko Stuebner <heiko@sntech.de>



-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 20/31] phy: rockchip: phy-rockchip-inno-dsidphy: Convert to platform remove callback returning void
  2023-03-07 11:58 ` [PATCH 20/31] phy: rockchip: phy-rockchip-inno-dsidphy: " Uwe Kleine-König
@ 2023-03-07 12:02   ` Heiko Stübner
  0 siblings, 0 replies; 42+ messages in thread
From: Heiko Stübner @ 2023-03-07 12:02 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Uwe Kleine-König
  Cc: linux-phy, linux-arm-kernel, linux-rockchip, kernel

Am Dienstag, 7. März 2023, 12:58:49 CET schrieb Uwe Kleine-König:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Heiko Stuebner <heiko@sntech.de>



-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 21/31] phy: rockchip: phy-rockchip-inno-hdmi: Convert to platform remove callback returning void
  2023-03-07 11:58 ` [PATCH 21/31] phy: rockchip: phy-rockchip-inno-hdmi: " Uwe Kleine-König
@ 2023-03-07 12:02   ` Heiko Stübner
  0 siblings, 0 replies; 42+ messages in thread
From: Heiko Stübner @ 2023-03-07 12:02 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Uwe Kleine-König
  Cc: linux-phy, linux-arm-kernel, linux-rockchip, kernel

Am Dienstag, 7. März 2023, 12:58:50 CET schrieb Uwe Kleine-König:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Heiko Stuebner <heiko@sntech.de>



-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 22/31] phy: rockchip: phy-rockchip-typec: Convert to platform remove callback returning void
  2023-03-07 11:58 ` [PATCH 22/31] phy: rockchip: phy-rockchip-typec: " Uwe Kleine-König
@ 2023-03-07 12:02   ` Heiko Stübner
  0 siblings, 0 replies; 42+ messages in thread
From: Heiko Stübner @ 2023-03-07 12:02 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Uwe Kleine-König
  Cc: linux-phy, linux-arm-kernel, linux-rockchip, kernel

Am Dienstag, 7. März 2023, 12:58:51 CET schrieb Uwe Kleine-König:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Heiko Stuebner <heiko@sntech.de>



-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 16/31] phy: renesas: phy-rcar-gen3-usb2: Convert to platform remove callback returning void
  2023-03-07 11:58 ` [PATCH 16/31] phy: renesas: phy-rcar-gen3-usb2: " Uwe Kleine-König
@ 2023-03-07 13:35   ` Geert Uytterhoeven
  0 siblings, 0 replies; 42+ messages in thread
From: Geert Uytterhoeven @ 2023-03-07 13:35 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Yoshihiro Shimoda, Vinod Koul, Kishon Vijay Abraham I,
	linux-renesas-soc, linux-phy, kernel

On Tue, Mar 7, 2023 at 1:11 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
>
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 17/31] phy: renesas: phy-rcar-gen3-usb3: Convert to platform remove callback returning void
  2023-03-07 11:58 ` [PATCH 17/31] phy: renesas: phy-rcar-gen3-usb3: " Uwe Kleine-König
@ 2023-03-07 13:36   ` Geert Uytterhoeven
  0 siblings, 0 replies; 42+ messages in thread
From: Geert Uytterhoeven @ 2023-03-07 13:36 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Yoshihiro Shimoda, Vinod Koul, Kishon Vijay Abraham I,
	linux-renesas-soc, linux-phy, kernel

On Tue, Mar 7, 2023 at 1:11 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
>
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 02/31] phy: broadcom: phy-brcm-usb: Convert to platform remove callback returning void
  2023-03-07 11:58 ` [PATCH 02/31] phy: broadcom: phy-brcm-usb: " Uwe Kleine-König
@ 2023-03-07 16:56   ` Florian Fainelli
  2023-03-07 17:06     ` Justin Chen
  0 siblings, 1 reply; 42+ messages in thread
From: Florian Fainelli @ 2023-03-07 16:56 UTC (permalink / raw)
  To: Uwe Kleine-König, Justin Chen, Al Cooper, Vinod Koul,
	Kishon Vijay Abraham I
  Cc: Broadcom internal kernel review list, kernel, linux-phy

On 3/7/23 03:58, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 02/31] phy: broadcom: phy-brcm-usb: Convert to platform remove callback returning void
  2023-03-07 16:56   ` Florian Fainelli
@ 2023-03-07 17:06     ` Justin Chen
  0 siblings, 0 replies; 42+ messages in thread
From: Justin Chen @ 2023-03-07 17:06 UTC (permalink / raw)
  To: Florian Fainelli, Uwe Kleine-König, Al Cooper, Vinod Koul,
	Kishon Vijay Abraham I
  Cc: Broadcom internal kernel review list, kernel, linux-phy



On 3/7/2023 8:56 AM, Florian Fainelli wrote:
> On 3/7/23 03:58, Uwe Kleine-König wrote:
>> The .remove() callback for a platform driver returns an int which makes
>> many driver authors wrongly assume it's possible to do error handling by
>> returning an error code. However the value returned is (mostly) ignored
>> and this typically results in resource leaks. To improve here there is a
>> quest to make the remove callback return void. In the first step of this
>> quest all drivers are converted to .remove_new() which already returns
>> void.
>>
>> Trivially convert this driver from always returning zero in the remove
>> callback to the void returning variant.
>>
>> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

Reviewed-by: Justin Chen <justinpopo6@gmail.com>

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 01/31] phy: allwinner: phy-sun4i-usb: Convert to platform remove callback returning void
  2023-03-07 11:58 ` [PATCH 01/31] phy: allwinner: phy-sun4i-usb: " Uwe Kleine-König
@ 2023-03-14 20:11   ` Jernej Škrabec
  0 siblings, 0 replies; 42+ messages in thread
From: Jernej Škrabec @ 2023-03-14 20:11 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Chen-Yu Tsai, Samuel Holland,
	Andre Przywara, Wolfram Sang, Icenowy Zheng,
	Uwe Kleine-König
  Cc: linux-phy, linux-arm-kernel, linux-sunxi, kernel

Dne torek, 07. marec 2023 ob 12:58:30 CET je Uwe Kleine-König napisal(a):
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej

>  drivers/phy/allwinner/phy-sun4i-usb.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c
> b/drivers/phy/allwinner/phy-sun4i-usb.c index fbcd7014ab43..6a74e5ce180a
> 100644
> --- a/drivers/phy/allwinner/phy-sun4i-usb.c
> +++ b/drivers/phy/allwinner/phy-sun4i-usb.c
> @@ -698,7 +698,7 @@ static struct phy *sun4i_usb_phy_xlate(struct device
> *dev, return data->phys[args->args[0]].phy;
>  }
> 
> -static int sun4i_usb_phy_remove(struct platform_device *pdev)
> +static void sun4i_usb_phy_remove(struct platform_device *pdev)
>  {
>  	struct device *dev = &pdev->dev;
>  	struct sun4i_usb_phy_data *data = dev_get_drvdata(dev);
> @@ -711,8 +711,6 @@ static int sun4i_usb_phy_remove(struct platform_device
> *pdev) devm_free_irq(dev, data->vbus_det_irq, data);
> 
>  	cancel_delayed_work_sync(&data->detect);
> -
> -	return 0;
>  }
> 
>  static const unsigned int sun4i_usb_phy0_cable[] = {
> @@ -1054,7 +1052,7 @@ MODULE_DEVICE_TABLE(of, sun4i_usb_phy_of_match);
> 
>  static struct platform_driver sun4i_usb_phy_driver = {
>  	.probe	= sun4i_usb_phy_probe,
> -	.remove	= sun4i_usb_phy_remove,
> +	.remove_new = sun4i_usb_phy_remove,
>  	.driver = {
>  		.of_match_table	= sun4i_usb_phy_of_match,
>  		.name  = "sun4i-usb-phy",





-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 00/31] phy: Convert to platform remove callback returning void
  2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (30 preceding siblings ...)
  2023-03-07 11:59 ` [PATCH 31/31] phy: ti: phy-twl4030-usb: " Uwe Kleine-König
@ 2023-03-20 11:38 ` Vinod Koul
  31 siblings, 0 replies; 42+ messages in thread
From: Vinod Koul @ 2023-03-20 11:38 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Kishon Vijay Abraham I, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, Andre Przywara, Wolfram Sang, Icenowy Zheng,
	Justin Chen, Al Cooper, Pratyush Yadav, Rahul T R,
	Swapnil Jakhade, Lars-Peter Clausen, Shawn Guo, Sascha Hauer,
	Liu Ying, Yuan Can, Chun-Kuang Hu, Philipp Zabel, Chunfeng Yun,
	Matthias Brugger, Thomas Gleixner, Allison Randal,
	Greg Kroah-Hartman, Miaoqian Lin, Andy Gross, Bjorn Andersson,
	Yoshihiro Shimoda, Heiko Stuebner, Maxime Coquelin,
	Alexandre Torgue, Amelie Delaunay, Dan Carpenter, Fabrice Gasnier,
	JC Kuo, Thierry Reding, Jonathan Hunter, Roger Quadros,
	Matt Ranostay, Sinthu Raja, Vignesh Raghavendra, Tanmay Patil,
	Siddharth Vadapalli, Lv Ruyi, linux-phy, linux-arm-kernel,
	linux-sunxi, kernel, Broadcom internal kernel review list,
	Fabio Estevam, NXP Linux Team, AngeloGioacchino Del Regno,
	dri-devel, linux-mediatek, Konrad Dybcio, linux-arm-msm,
	linux-renesas-soc, linux-rockchip, linux-stm32, linux-tegra

On 07-03-23, 12:58, Uwe Kleine-König wrote:
> Hello,
> 
> this patch series adapts the platform drivers below drivers/phy to use the
> .remove_new() callback. Compared to the traditional .remove() callback
> .remove_new() returns no value. This is a good thing because the driver core
> doesn't (and cannot) cope for errors during remove. The only effect of a
> non-zero return value in .remove() is that the driver core emits a warning. The
> device is removed anyhow and an early return from .remove() usually yields a
> resource leak.
> 
> By changing the remove callback to return void driver authors cannot
> reasonably assume any more that there is some kind of cleanup later.
> 
> All drivers in drivers/spmi returned zero unconditionally in their remove
> callback, so they could all be converted trivially to .remove_new().
> 
> Note that this series depends on commit 5c5a7680e67b ("platform: Provide
> a remove callback that returns no value") which is included in v6.3-rc1.

Applied, thanks

-- 
~Vinod

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2023-03-20 11:38 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-07 11:58 [PATCH 00/31] phy: Convert to platform remove callback returning void Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 01/31] phy: allwinner: phy-sun4i-usb: " Uwe Kleine-König
2023-03-14 20:11   ` Jernej Škrabec
2023-03-07 11:58 ` [PATCH 02/31] phy: broadcom: phy-brcm-usb: " Uwe Kleine-König
2023-03-07 16:56   ` Florian Fainelli
2023-03-07 17:06     ` Justin Chen
2023-03-07 11:58 ` [PATCH 03/31] phy: cadence: cdns-dphy: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 04/31] phy: cadence: phy-cadence-sierra: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 05/31] phy: cadence: phy-cadence-torrent: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 06/31] phy: freescale: phy-fsl-imx8qm-lvds-phy: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 07/31] phy: intel: phy-intel-lgm-combo: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 08/31] phy: mediatek: phy-mtk-mipi-dsi: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 09/31] phy: motorola: phy-cpcap-usb: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 10/31] phy: motorola: phy-mapphone-mdm6600: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 11/31] phy: phy-lgm-usb: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 12/31] phy: qualcomm: phy-qcom-apq8064-sata: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 13/31] phy: qualcomm: phy-qcom-eusb2-repeater: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 14/31] phy: qualcomm: phy-qcom-ipq806x-sata: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 15/31] phy: renesas: phy-rcar-gen3-pcie: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 16/31] phy: renesas: phy-rcar-gen3-usb2: " Uwe Kleine-König
2023-03-07 13:35   ` Geert Uytterhoeven
2023-03-07 11:58 ` [PATCH 17/31] phy: renesas: phy-rcar-gen3-usb3: " Uwe Kleine-König
2023-03-07 13:36   ` Geert Uytterhoeven
2023-03-07 11:58 ` [PATCH 18/31] phy: renesas: r8a779f0-ether-serdes: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 19/31] phy: rockchip: phy-rockchip-inno-csidphy: " Uwe Kleine-König
2023-03-07 12:02   ` Heiko Stübner
2023-03-07 11:58 ` [PATCH 20/31] phy: rockchip: phy-rockchip-inno-dsidphy: " Uwe Kleine-König
2023-03-07 12:02   ` Heiko Stübner
2023-03-07 11:58 ` [PATCH 21/31] phy: rockchip: phy-rockchip-inno-hdmi: " Uwe Kleine-König
2023-03-07 12:02   ` Heiko Stübner
2023-03-07 11:58 ` [PATCH 22/31] phy: rockchip: phy-rockchip-typec: " Uwe Kleine-König
2023-03-07 12:02   ` Heiko Stübner
2023-03-07 11:58 ` [PATCH 23/31] phy: st: phy-stm32-usbphyc: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 24/31] phy: tegra: xusb: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 25/31] phy: ti: phy-am654-serdes: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 26/31] phy: ti: phy-da8xx-usb: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 27/31] phy: ti: phy-dm816x-usb: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 28/31] phy: ti: phy-j721e-wiz: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 29/31] phy: ti: phy-omap-usb2: " Uwe Kleine-König
2023-03-07 11:58 ` [PATCH 30/31] phy: ti: phy-ti-pipe3: " Uwe Kleine-König
2023-03-07 11:59 ` [PATCH 31/31] phy: ti: phy-twl4030-usb: " Uwe Kleine-König
2023-03-20 11:38 ` [PATCH 00/31] phy: " Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).