linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/15] PCI: Convert to platform remove callback returning void
@ 2023-03-21 19:31 Uwe Kleine-König
  2023-03-21 19:32 ` [PATCH 09/15] PCI: mediatek: " Uwe Kleine-König
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2023-03-21 19:31 UTC (permalink / raw)
  To: Thomas Petazzoni, Pali Rohár, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Bjorn Helgaas, Joyce Ooi,
	Florian Fainelli, Jim Quinlan, Nicolas Saenz Julienne,
	Vignesh Raghavendra, Tom Joseph, Shawn Guo, Rahul Tanwar,
	Manivannan Sadhasivam, Thierry Reding, Jonathan Hunter,
	Serge Semin, Vidya Sagar, Jisheng Zhang, Miaoqian Lin, Ray Jui,
	Scott Branden, Ryder Lee, Jianjun Wang, Matthias Brugger,
	Sergio Paracuellos, Shawn Lin, Heiko Stuebner, Toan Le
  Cc: Rob Herring, linux-pci, linux-arm-kernel, kernel,
	Broadcom internal kernel review list, linux-rpi-kernel,
	linux-omap, linux-arm-msm, linux-tegra,
	AngeloGioacchino Del Regno, linux-mediatek, linux-rockchip

Hello,

this series adapts the platform drivers below drivers/pci 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 were easy to convert as they all returned zero in their
remove callback. Only for iproc the conversion wasn't trivial, the other
were converted using coccinelle.

There are no interdependencies between these patches. So even if there
are some concerns for individual patches, I ask you to apply the
remaining set. Then I only have to care for the review feedback of the
refused patches. (Having said that I don't expect any serious objection,
just things like squashing or separating patches, or maybe I picked a
wrong subject prefix.)

Best regards
Uwe

Uwe Kleine-König (15):
  PCI: aardvark: Convert to platform remove callback returning void
  PCI: altera: Convert to platform remove callback returning void
  PCI: altera-msi: Convert to platform remove callback returning void
  PCI: brcmstb: Convert to platform remove callback returning void
  PCI: cadence/j721e: Convert to platform remove callback returning void
  PCI: dwc/*: Convert to platform remove callback returning void
  PCI: hisi-error: Convert to platform remove callback returning void
  PCI: iproc: Convert to platform remove callback returning void
  PCI: mediatek: Convert to platform remove callback returning void
  PCI: mediatek-gen3: Convert to platform remove callback returning void
  PCI: mt7621: Convert to platform remove callback returning void
  PCI: mvebu: Convert to platform remove callback returning void
  PCI: rockchip-host: Convert to platform remove callback returning void
  PCI: tegra: Convert to platform remove callback returning void
  PCI: xgene-msi: Convert to platform remove callback returning void

 drivers/pci/controller/cadence/pci-j721e.c   | 6 ++----
 drivers/pci/controller/dwc/pcie-bt1.c        | 6 ++----
 drivers/pci/controller/dwc/pcie-histb.c      | 6 ++----
 drivers/pci/controller/dwc/pcie-intel-gw.c   | 6 ++----
 drivers/pci/controller/dwc/pcie-qcom-ep.c    | 8 +++-----
 drivers/pci/controller/dwc/pcie-tegra194.c   | 8 +++-----
 drivers/pci/controller/pci-aardvark.c        | 6 ++----
 drivers/pci/controller/pci-mvebu.c           | 6 ++----
 drivers/pci/controller/pci-tegra.c           | 6 ++----
 drivers/pci/controller/pci-xgene-msi.c       | 6 ++----
 drivers/pci/controller/pcie-altera-msi.c     | 5 ++---
 drivers/pci/controller/pcie-altera.c         | 6 ++----
 drivers/pci/controller/pcie-brcmstb.c        | 6 ++----
 drivers/pci/controller/pcie-hisi-error.c     | 6 ++----
 drivers/pci/controller/pcie-iproc-platform.c | 6 +++---
 drivers/pci/controller/pcie-iproc.c          | 4 +---
 drivers/pci/controller/pcie-iproc.h          | 2 +-
 drivers/pci/controller/pcie-mediatek-gen3.c  | 6 ++----
 drivers/pci/controller/pcie-mediatek.c       | 6 ++----
 drivers/pci/controller/pcie-mt7621.c         | 6 ++----
 drivers/pci/controller/pcie-rockchip-host.c  | 6 ++----
 21 files changed, 43 insertions(+), 80 deletions(-)

base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
-- 
2.39.2



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

* [PATCH 09/15] PCI: mediatek: Convert to platform remove callback returning void
  2023-03-21 19:31 [PATCH 00/15] PCI: Convert to platform remove callback returning void Uwe Kleine-König
@ 2023-03-21 19:32 ` Uwe Kleine-König
  2023-03-21 19:32 ` [PATCH 10/15] PCI: mediatek-gen3: " Uwe Kleine-König
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2023-03-21 19:32 UTC (permalink / raw)
  To: Ryder Lee, Jianjun Wang, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Bjorn Helgaas, Matthias Brugger
  Cc: Rob Herring, AngeloGioacchino Del Regno, linux-pci,
	linux-mediatek, kernel, 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/pci/controller/pcie-mediatek.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c
index ae5ad05ddc1d..7ee03400961b 100644
--- a/drivers/pci/controller/pcie-mediatek.c
+++ b/drivers/pci/controller/pcie-mediatek.c
@@ -1134,7 +1134,7 @@ static void mtk_pcie_free_resources(struct mtk_pcie *pcie)
 	pci_free_resource_list(windows);
 }
 
-static int mtk_pcie_remove(struct platform_device *pdev)
+static void mtk_pcie_remove(struct platform_device *pdev)
 {
 	struct mtk_pcie *pcie = platform_get_drvdata(pdev);
 	struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);
@@ -1146,8 +1146,6 @@ static int mtk_pcie_remove(struct platform_device *pdev)
 	mtk_pcie_irq_teardown(pcie);
 
 	mtk_pcie_put_resources(pcie);
-
-	return 0;
 }
 
 static int mtk_pcie_suspend_noirq(struct device *dev)
@@ -1239,7 +1237,7 @@ MODULE_DEVICE_TABLE(of, mtk_pcie_ids);
 
 static struct platform_driver mtk_pcie_driver = {
 	.probe = mtk_pcie_probe,
-	.remove = mtk_pcie_remove,
+	.remove_new = mtk_pcie_remove,
 	.driver = {
 		.name = "mtk-pcie",
 		.of_match_table = mtk_pcie_ids,
-- 
2.39.2



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

* [PATCH 10/15] PCI: mediatek-gen3: Convert to platform remove callback returning void
  2023-03-21 19:31 [PATCH 00/15] PCI: Convert to platform remove callback returning void Uwe Kleine-König
  2023-03-21 19:32 ` [PATCH 09/15] PCI: mediatek: " Uwe Kleine-König
@ 2023-03-21 19:32 ` Uwe Kleine-König
  2023-03-21 19:32 ` [PATCH 11/15] PCI: mt7621: " Uwe Kleine-König
  2023-05-30 14:07 ` [PATCH 00/15] PCI: " Uwe Kleine-König
  3 siblings, 0 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2023-03-21 19:32 UTC (permalink / raw)
  To: Ryder Lee, Jianjun Wang, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Bjorn Helgaas, Matthias Brugger
  Cc: Rob Herring, AngeloGioacchino Del Regno, linux-pci,
	linux-mediatek, kernel, 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/pci/controller/pcie-mediatek-gen3.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/controller/pcie-mediatek-gen3.c
index b8612ce5f4d0..e0e27645fdf4 100644
--- a/drivers/pci/controller/pcie-mediatek-gen3.c
+++ b/drivers/pci/controller/pcie-mediatek-gen3.c
@@ -943,7 +943,7 @@ static int mtk_pcie_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int mtk_pcie_remove(struct platform_device *pdev)
+static void mtk_pcie_remove(struct platform_device *pdev)
 {
 	struct mtk_gen3_pcie *pcie = platform_get_drvdata(pdev);
 	struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);
@@ -955,8 +955,6 @@ static int mtk_pcie_remove(struct platform_device *pdev)
 
 	mtk_pcie_irq_teardown(pcie);
 	mtk_pcie_power_down(pcie);
-
-	return 0;
 }
 
 static void mtk_pcie_irq_save(struct mtk_gen3_pcie *pcie)
@@ -1069,7 +1067,7 @@ MODULE_DEVICE_TABLE(of, mtk_pcie_of_match);
 
 static struct platform_driver mtk_pcie_driver = {
 	.probe = mtk_pcie_probe,
-	.remove = mtk_pcie_remove,
+	.remove_new = mtk_pcie_remove,
 	.driver = {
 		.name = "mtk-pcie-gen3",
 		.of_match_table = mtk_pcie_of_match,
-- 
2.39.2



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

* [PATCH 11/15] PCI: mt7621: Convert to platform remove callback returning void
  2023-03-21 19:31 [PATCH 00/15] PCI: Convert to platform remove callback returning void Uwe Kleine-König
  2023-03-21 19:32 ` [PATCH 09/15] PCI: mediatek: " Uwe Kleine-König
  2023-03-21 19:32 ` [PATCH 10/15] PCI: mediatek-gen3: " Uwe Kleine-König
@ 2023-03-21 19:32 ` Uwe Kleine-König
  2023-03-22  6:40   ` Sergio Paracuellos
  2023-05-30 14:07 ` [PATCH 00/15] PCI: " Uwe Kleine-König
  3 siblings, 1 reply; 8+ messages in thread
From: Uwe Kleine-König @ 2023-03-21 19:32 UTC (permalink / raw)
  To: Sergio Paracuellos, Lorenzo Pieralisi, Krzysztof Wilczyński,
	Bjorn Helgaas, Matthias Brugger
  Cc: Rob Herring, AngeloGioacchino Del Regno, linux-pci, kernel,
	linux-arm-kernel, linux-mediatek

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/pci/controller/pcie-mt7621.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c
index 63a5f4463a9f..a6df50a945d1 100644
--- a/drivers/pci/controller/pcie-mt7621.c
+++ b/drivers/pci/controller/pcie-mt7621.c
@@ -524,15 +524,13 @@ static int mt7621_pcie_probe(struct platform_device *pdev)
 	return err;
 }
 
-static int mt7621_pcie_remove(struct platform_device *pdev)
+static void mt7621_pcie_remove(struct platform_device *pdev)
 {
 	struct mt7621_pcie *pcie = platform_get_drvdata(pdev);
 	struct mt7621_pcie_port *port;
 
 	list_for_each_entry(port, &pcie->ports, list)
 		reset_control_put(port->pcie_rst);
-
-	return 0;
 }
 
 static const struct of_device_id mt7621_pcie_ids[] = {
@@ -543,7 +541,7 @@ MODULE_DEVICE_TABLE(of, mt7621_pcie_ids);
 
 static struct platform_driver mt7621_pcie_driver = {
 	.probe = mt7621_pcie_probe,
-	.remove = mt7621_pcie_remove,
+	.remove_new = mt7621_pcie_remove,
 	.driver = {
 		.name = "mt7621-pci",
 		.of_match_table = mt7621_pcie_ids,
-- 
2.39.2



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

* Re: [PATCH 11/15] PCI: mt7621: Convert to platform remove callback returning void
  2023-03-21 19:32 ` [PATCH 11/15] PCI: mt7621: " Uwe Kleine-König
@ 2023-03-22  6:40   ` Sergio Paracuellos
  0 siblings, 0 replies; 8+ messages in thread
From: Sergio Paracuellos @ 2023-03-22  6:40 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Lorenzo Pieralisi, Krzysztof Wilczyński, Bjorn Helgaas,
	Matthias Brugger, Rob Herring, AngeloGioacchino Del Regno,
	linux-pci, kernel, linux-arm-kernel, linux-mediatek

On Tue, Mar 21, 2023 at 8:32 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>
> ---
>  drivers/pci/controller/pcie-mt7621.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Best regards,
    Sergio Paracuellos


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

* Re: [PATCH 00/15] PCI: Convert to platform remove callback returning void
  2023-03-21 19:31 [PATCH 00/15] PCI: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (2 preceding siblings ...)
  2023-03-21 19:32 ` [PATCH 11/15] PCI: mt7621: " Uwe Kleine-König
@ 2023-05-30 14:07 ` Uwe Kleine-König
  2023-06-02 21:37   ` Bjorn Helgaas
  3 siblings, 1 reply; 8+ messages in thread
From: Uwe Kleine-König @ 2023-05-30 14:07 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Thomas Petazzoni, Pali Rohár, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Joyce Ooi, Florian Fainelli,
	Jim Quinlan, Nicolas Saenz Julienne, Vignesh Raghavendra,
	Tom Joseph, Shawn Guo, Rahul Tanwar, Manivannan Sadhasivam,
	Thierry Reding, Jonathan Hunter, Serge Semin, Vidya Sagar,
	Jisheng Zhang, Miaoqian Lin, Ray Jui, Scott Branden, Ryder Lee,
	Jianjun Wang, Matthias Brugger, Sergio Paracuellos, Shawn Lin,
	Heiko Stuebner, Toan Le, Rob Herring, linux-pci, linux-rockchip,
	Broadcom internal kernel review list, linux-rpi-kernel, kernel,
	linux-arm-msm, linux-tegra, linux-mediatek, linux-omap,
	linux-arm-kernel, AngeloGioacchino Del Regno

[-- Attachment #1: Type: text/plain, Size: 1699 bytes --]

Hello Bjorn,

On Tue, Mar 21, 2023 at 08:31:53PM +0100, Uwe Kleine-König wrote:
> this series adapts the platform drivers below drivers/pci 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 were easy to convert as they all returned zero in their
> remove callback. Only for iproc the conversion wasn't trivial, the other
> were converted using coccinelle.
> 
> There are no interdependencies between these patches. So even if there
> are some concerns for individual patches, I ask you to apply the
> remaining set. Then I only have to care for the review feedback of the
> refused patches. (Having said that I don't expect any serious objection,
> just things like squashing or separating patches, or maybe I picked a
> wrong subject prefix.)

These patches wait for application for quite some time now. They apply
just fine to v6.4-rc1 and next/master. Would be great to get them in
during the next merge window and ideally give them some time in next
before.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 00/15] PCI: Convert to platform remove callback returning void
  2023-05-30 14:07 ` [PATCH 00/15] PCI: " Uwe Kleine-König
@ 2023-06-02 21:37   ` Bjorn Helgaas
  2023-06-06 16:02     ` Uwe Kleine-König
  0 siblings, 1 reply; 8+ messages in thread
From: Bjorn Helgaas @ 2023-06-02 21:37 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Bjorn Helgaas, Thomas Petazzoni, Pali Rohár,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Joyce Ooi,
	Florian Fainelli, Jim Quinlan, Nicolas Saenz Julienne,
	Vignesh Raghavendra, Tom Joseph, Shawn Guo, Rahul Tanwar,
	Manivannan Sadhasivam, Thierry Reding, Jonathan Hunter,
	Serge Semin, Vidya Sagar, Jisheng Zhang, Miaoqian Lin, Ray Jui,
	Scott Branden, Ryder Lee, Jianjun Wang, Matthias Brugger,
	Sergio Paracuellos, Shawn Lin, Heiko Stuebner, Toan Le,
	Rob Herring, linux-pci, linux-rockchip,
	Broadcom internal kernel review list, linux-rpi-kernel, kernel,
	linux-arm-msm, linux-tegra, linux-mediatek, linux-omap,
	linux-arm-kernel, AngeloGioacchino Del Regno

On Tue, May 30, 2023 at 04:07:42PM +0200, Uwe Kleine-König wrote:
> Hello Bjorn,
> 
> On Tue, Mar 21, 2023 at 08:31:53PM +0100, Uwe Kleine-König wrote:
> > this series adapts the platform drivers below drivers/pci 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 were easy to convert as they all returned zero in their
> > remove callback. Only for iproc the conversion wasn't trivial, the other
> > were converted using coccinelle.
> > 
> > There are no interdependencies between these patches. So even if there
> > are some concerns for individual patches, I ask you to apply the
> > remaining set. Then I only have to care for the review feedback of the
> > refused patches. (Having said that I don't expect any serious objection,
> > just things like squashing or separating patches, or maybe I picked a
> > wrong subject prefix.)
> 
> These patches wait for application for quite some time now. They apply
> just fine to v6.4-rc1 and next/master. Would be great to get them in
> during the next merge window and ideally give them some time in next
> before.

Thanks, these seem fine to me, and Lorenzo normally takes care of
drivers/pci/controller/.  Lorenzo, if it's easier to have me apply
them, that's fine, too, just let me know.

The only tweaks I would make would be:

  PCI: j721e: Convert to platform remove callback returning void
  PCI: dwc: Convert to platform remove callback returning void

to match the git history.


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

* Re: [PATCH 00/15] PCI: Convert to platform remove callback returning void
  2023-06-02 21:37   ` Bjorn Helgaas
@ 2023-06-06 16:02     ` Uwe Kleine-König
  0 siblings, 0 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2023-06-06 16:02 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Krzysztof Wilczyński, Miaoqian Lin, Vignesh Raghavendra,
	linux-pci, Lorenzo Pieralisi, Matthias Brugger, Thierry Reding,
	Jisheng Zhang, Toan Le, Heiko Stuebner, Rob Herring,
	Florian Fainelli, linux-rockchip, Joyce Ooi, Jonathan Hunter,
	Jianjun Wang, Sergio Paracuellos, Rahul Tanwar, Jim Quinlan,
	Broadcom internal kernel review list, linux-arm-msm, Shawn Lin,
	Nicolas Saenz Julienne, linux-tegra, kernel,
	Manivannan Sadhasivam, Ray Jui, Ryder Lee, linux-mediatek,
	linux-rpi-kernel, Bjorn Helgaas, linux-omap, linux-arm-kernel,
	AngeloGioacchino Del Regno, Scott Branden, Vidya Sagar,
	Serge Semin, Tom Joseph, Thomas Petazzoni, Shawn Guo,
	Pali Rohár

[-- Attachment #1: Type: text/plain, Size: 2641 bytes --]

Hello,

[dropped Tom Joseph and Joyce Ooi from Cc:, my last mail in this thread
resulted in a bounce for their addresses.]

On Fri, Jun 02, 2023 at 04:37:34PM -0500, Bjorn Helgaas wrote:
> On Tue, May 30, 2023 at 04:07:42PM +0200, Uwe Kleine-König wrote:
> > Hello Bjorn,
> > 
> > On Tue, Mar 21, 2023 at 08:31:53PM +0100, Uwe Kleine-König wrote:
> > > this series adapts the platform drivers below drivers/pci 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 were easy to convert as they all returned zero in their
> > > remove callback. Only for iproc the conversion wasn't trivial, the other
> > > were converted using coccinelle.
> > > 
> > > There are no interdependencies between these patches. So even if there
> > > are some concerns for individual patches, I ask you to apply the
> > > remaining set. Then I only have to care for the review feedback of the
> > > refused patches. (Having said that I don't expect any serious objection,
> > > just things like squashing or separating patches, or maybe I picked a
> > > wrong subject prefix.)
> > 
> > These patches wait for application for quite some time now. They apply
> > just fine to v6.4-rc1 and next/master. Would be great to get them in
> > during the next merge window and ideally give them some time in next
> > before.
> 
> Thanks, these seem fine to me, and Lorenzo normally takes care of
> drivers/pci/controller/.  Lorenzo, if it's easier to have me apply
> them, that's fine, too, just let me know.
> 
> The only tweaks I would make would be:
> 
>   PCI: j721e: Convert to platform remove callback returning void
>   PCI: dwc: Convert to platform remove callback returning void

If it's easier for you (or Lorenzo) I can resend with these tweaks.
Otherwise if these are adapted when applying them, that's fine for me,
too. Just tell me if I should do anything here.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2023-06-06 16:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21 19:31 [PATCH 00/15] PCI: Convert to platform remove callback returning void Uwe Kleine-König
2023-03-21 19:32 ` [PATCH 09/15] PCI: mediatek: " Uwe Kleine-König
2023-03-21 19:32 ` [PATCH 10/15] PCI: mediatek-gen3: " Uwe Kleine-König
2023-03-21 19:32 ` [PATCH 11/15] PCI: mt7621: " Uwe Kleine-König
2023-03-22  6:40   ` Sergio Paracuellos
2023-05-30 14:07 ` [PATCH 00/15] PCI: " Uwe Kleine-König
2023-06-02 21:37   ` Bjorn Helgaas
2023-06-06 16:02     ` Uwe Kleine-König

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).