* [PATCH 0/7] pcmcia: Convert to platform remove callback returning void
@ 2023-12-08 16:08 Uwe Kleine-König
2023-12-08 16:08 ` [PATCH 5/7] pcmcia: pxa2xx: " Uwe Kleine-König
2023-12-08 19:19 ` [PATCH 0/7] pcmcia: " Dominik Brodowski
0 siblings, 2 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2023-12-08 16:08 UTC (permalink / raw)
To: Dominik Brodowski, Greg Kroah-Hartman
Cc: Pavel Machek, Kalle Valo, Steven Rostedt (Google), Paolo Abeni,
linux-kernel, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
linux-arm-kernel, Viresh Kumar, Lee Jones, Linus Walleij,
Arnd Bergmann, kernel
Hello,
this series changes all platform drivers in drivers/pcmcia to use the
.remove_new() callback. See commit 5c5a7680e67b ("platform: Provide a
remove callback that returns no value") for an extended explanation and
the eventual goal.
All conversations are trivial, because all .remove() callbacks returned
zero unconditionally already.
There are no interdependencies between these patches, so they could be
picked up individually. However I'd expect them to go in all together.
It's unclrear to me though, who will pick them up. Dominik? Greg?
Best regards
Uwe
Uwe Kleine-König (7):
pcmcia: bcm63xx: Convert to platform remove callback returning void
pcmcia: db1xxx_ss: Convert to platform remove callback returning void
pcmcia: electra_cf: Convert to platform remove callback returning void
pcmcia: omap_cf: Convert to platform remove callback returning void
pcmcia: pxa2xx: Convert to platform remove callback returning void
pcmcia: sa1100: Convert to platform remove callback returning void
pcmcia: xxs1500_ss: Convert to platform remove callback returning void
drivers/pcmcia/bcm63xx_pcmcia.c | 5 ++---
drivers/pcmcia/db1xxx_ss.c | 6 ++----
drivers/pcmcia/electra_cf.c | 6 ++----
drivers/pcmcia/omap_cf.c | 5 ++---
drivers/pcmcia/pxa2xx_base.c | 6 ++----
drivers/pcmcia/sa1100_generic.c | 8 +++-----
drivers/pcmcia/xxs1500_ss.c | 6 ++----
7 files changed, 15 insertions(+), 27 deletions(-)
base-commit: 8e00ce02066e8f6f1ad5eab49a2ede7bf7a5ef64
--
2.42.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 5/7] pcmcia: pxa2xx: Convert to platform remove callback returning void
2023-12-08 16:08 [PATCH 0/7] pcmcia: Convert to platform remove callback returning void Uwe Kleine-König
@ 2023-12-08 16:08 ` Uwe Kleine-König
2023-12-08 19:19 ` [PATCH 0/7] pcmcia: " Dominik Brodowski
1 sibling, 0 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2023-12-08 16:08 UTC (permalink / raw)
To: Dominik Brodowski, Greg Kroah-Hartman
Cc: Daniel Mack, Haojian Zhuang, Robert Jarzmik, linux-arm-kernel,
linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().
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/pcmcia/pxa2xx_base.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c
index 5254028354f4..457fb81b497a 100644
--- a/drivers/pcmcia/pxa2xx_base.c
+++ b/drivers/pcmcia/pxa2xx_base.c
@@ -313,15 +313,13 @@ static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev)
return ret;
}
-static int pxa2xx_drv_pcmcia_remove(struct platform_device *dev)
+static void pxa2xx_drv_pcmcia_remove(struct platform_device *dev)
{
struct skt_dev_info *sinfo = platform_get_drvdata(dev);
int i;
for (i = 0; i < sinfo->nskt; i++)
soc_pcmcia_remove_one(&sinfo->skt[i]);
-
- return 0;
}
static int pxa2xx_drv_pcmcia_resume(struct device *dev)
@@ -338,7 +336,7 @@ static const struct dev_pm_ops pxa2xx_drv_pcmcia_pm_ops = {
static struct platform_driver pxa2xx_pcmcia_driver = {
.probe = pxa2xx_drv_pcmcia_probe,
- .remove = pxa2xx_drv_pcmcia_remove,
+ .remove_new = pxa2xx_drv_pcmcia_remove,
.driver = {
.name = "pxa2xx-pcmcia",
.pm = &pxa2xx_drv_pcmcia_pm_ops,
--
2.42.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/7] pcmcia: Convert to platform remove callback returning void
2023-12-08 16:08 [PATCH 0/7] pcmcia: Convert to platform remove callback returning void Uwe Kleine-König
2023-12-08 16:08 ` [PATCH 5/7] pcmcia: pxa2xx: " Uwe Kleine-König
@ 2023-12-08 19:19 ` Dominik Brodowski
2023-12-09 9:28 ` Greg Kroah-Hartman
2023-12-09 13:56 ` Uwe Kleine-König
1 sibling, 2 replies; 6+ messages in thread
From: Dominik Brodowski @ 2023-12-08 19:19 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Greg Kroah-Hartman, Pavel Machek, Kalle Valo,
Steven Rostedt (Google), Paolo Abeni, linux-kernel, Daniel Mack,
Haojian Zhuang, Robert Jarzmik, linux-arm-kernel, Viresh Kumar,
Lee Jones, Linus Walleij, Arnd Bergmann, kernel
Am Fri, Dec 08, 2023 at 05:08:05PM +0100 schrieb Uwe Kleine-König:
> Hello,
>
> this series changes all platform drivers in drivers/pcmcia to use the
> .remove_new() callback. See commit 5c5a7680e67b ("platform: Provide a
> remove callback that returns no value") for an extended explanation and
> the eventual goal.
>
> All conversations are trivial, because all .remove() callbacks returned
> zero unconditionally already.
>
> There are no interdependencies between these patches, so they could be
> picked up individually. However I'd expect them to go in all together.
> It's unclrear to me though, who will pick them up. Dominik? Greg?
Both options are fine with me. In the latter case:
Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
Best
Dominik
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/7] pcmcia: Convert to platform remove callback returning void
2023-12-08 19:19 ` [PATCH 0/7] pcmcia: " Dominik Brodowski
@ 2023-12-09 9:28 ` Greg Kroah-Hartman
2023-12-09 14:05 ` Uwe Kleine-König
2023-12-09 13:56 ` Uwe Kleine-König
1 sibling, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2023-12-09 9:28 UTC (permalink / raw)
To: Dominik Brodowski
Cc: Uwe Kleine-König, Pavel Machek, Kalle Valo,
Steven Rostedt (Google), Paolo Abeni, linux-kernel, Daniel Mack,
Haojian Zhuang, Robert Jarzmik, linux-arm-kernel, Viresh Kumar,
Lee Jones, Linus Walleij, Arnd Bergmann, kernel
On Fri, Dec 08, 2023 at 08:19:08PM +0100, Dominik Brodowski wrote:
> Am Fri, Dec 08, 2023 at 05:08:05PM +0100 schrieb Uwe Kleine-König:
> > Hello,
> >
> > this series changes all platform drivers in drivers/pcmcia to use the
> > .remove_new() callback. See commit 5c5a7680e67b ("platform: Provide a
> > remove callback that returns no value") for an extended explanation and
> > the eventual goal.
> >
> > All conversations are trivial, because all .remove() callbacks returned
> > zero unconditionally already.
> >
> > There are no interdependencies between these patches, so they could be
> > picked up individually. However I'd expect them to go in all together.
> > It's unclrear to me though, who will pick them up. Dominik? Greg?
>
> Both options are fine with me. In the latter case:
>
> Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
I can take these, thanks!
greg k-h
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/7] pcmcia: Convert to platform remove callback returning void
2023-12-08 19:19 ` [PATCH 0/7] pcmcia: " Dominik Brodowski
2023-12-09 9:28 ` Greg Kroah-Hartman
@ 2023-12-09 13:56 ` Uwe Kleine-König
1 sibling, 0 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2023-12-09 13:56 UTC (permalink / raw)
To: Dominik Brodowski, Greg Kroah-Hartman
Cc: linux-arm-kernel, kernel, Arnd Bergmann, Kalle Valo, Lee Jones,
linux-kernel, Steven Rostedt (Google), Haojian Zhuang,
Pavel Machek, Viresh Kumar, Paolo Abeni, Robert Jarzmik,
Linus Walleij, Daniel Mack
[-- Attachment #1.1: Type: text/plain, Size: 1284 bytes --]
Hello Dominik,
On Fri, Dec 08, 2023 at 08:19:08PM +0100, Dominik Brodowski wrote:
> Am Fri, Dec 08, 2023 at 05:08:05PM +0100 schrieb Uwe Kleine-König:
> > Hello,
> >
> > this series changes all platform drivers in drivers/pcmcia to use the
> > .remove_new() callback. See commit 5c5a7680e67b ("platform: Provide a
> > remove callback that returns no value") for an extended explanation and
> > the eventual goal.
> >
> > All conversations are trivial, because all .remove() callbacks returned
> > zero unconditionally already.
> >
> > There are no interdependencies between these patches, so they could be
> > picked up individually. However I'd expect them to go in all together.
> > It's unclrear to me though, who will pick them up. Dominik? Greg?
>
> Both options are fine with me. In the latter case:
>
> Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
Then I suggest you to take them. I only suggested Greg as a fallback
because I was unsure how active you are given the PCMCIA entry in
MAINTAINERS has status "Odd Fixes".
Best regards and a calm pre-Christmas period,
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/7] pcmcia: Convert to platform remove callback returning void
2023-12-09 9:28 ` Greg Kroah-Hartman
@ 2023-12-09 14:05 ` Uwe Kleine-König
0 siblings, 0 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2023-12-09 14:05 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Dominik Brodowski, linux-arm-kernel, kernel, Arnd Bergmann,
Viresh Kumar, Kalle Valo, Lee Jones, linux-kernel,
Steven Rostedt (Google), Haojian Zhuang, Pavel Machek,
Paolo Abeni, Robert Jarzmik, Linus Walleij, Daniel Mack
[-- Attachment #1.1: Type: text/plain, Size: 594 bytes --]
Hello,
On Sat, Dec 09, 2023 at 10:28:36AM +0100, Greg Kroah-Hartman wrote:
> On Fri, Dec 08, 2023 at 08:19:08PM +0100, Dominik Brodowski wrote:
> > Both options are fine with me. In the latter case:
> >
> > Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
>
> I can take these, thanks!
I missed Greg's reply when I just suggested that Dominik should take
these. Either way is fine for me.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-12-09 14:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-08 16:08 [PATCH 0/7] pcmcia: Convert to platform remove callback returning void Uwe Kleine-König
2023-12-08 16:08 ` [PATCH 5/7] pcmcia: pxa2xx: " Uwe Kleine-König
2023-12-08 19:19 ` [PATCH 0/7] pcmcia: " Dominik Brodowski
2023-12-09 9:28 ` Greg Kroah-Hartman
2023-12-09 14:05 ` Uwe Kleine-König
2023-12-09 13:56 ` 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).