* [PATCH 0/4] fsi: Convert to platform remove callback returning void
@ 2024-03-05 21:20 Uwe Kleine-König
2024-03-05 21:20 ` [PATCH 1/4] fsi: master-aspeed: " Uwe Kleine-König
2024-04-11 7:13 ` [PATCH 0/4] fsi: " Uwe Kleine-König
0 siblings, 2 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2024-03-05 21:20 UTC (permalink / raw)
To: Jeremy Kerr, Joel Stanley
Cc: Alistar Popple, Eddie James, Andrew Jeffery, linux-fsi,
linux-arm-kernel, linux-aspeed, kernel
Hello,
this series converts all drivers below drivers/fsi to struct
platform_driver::remove_new(). 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 their .remove() callbacks
returned zero unconditionally.
There are no interdependencies between these patches, so they could be
picked up individually. But I'd hope that they get picked up all
together.
Best regards
Uwe
Uwe Kleine-König (4):
fsi: master-aspeed: Convert to platform remove callback returning void
fsi: master-ast-cf: Convert to platform remove callback returning void
fsi: master-gpio: Convert to platform remove callback returning void
fsi: occ: Convert to platform remove callback returning void
drivers/fsi/fsi-master-aspeed.c | 6 ++----
drivers/fsi/fsi-master-ast-cf.c | 6 ++----
drivers/fsi/fsi-master-gpio.c | 6 ++----
drivers/fsi/fsi-occ.c | 6 ++----
4 files changed, 8 insertions(+), 16 deletions(-)
base-commit: 11afac187274a6177a7ac82997f8691c0f469e41
--
2.43.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] 5+ messages in thread* [PATCH 1/4] fsi: master-aspeed: Convert to platform remove callback returning void
2024-03-05 21:20 [PATCH 0/4] fsi: Convert to platform remove callback returning void Uwe Kleine-König
@ 2024-03-05 21:20 ` Uwe Kleine-König
2024-04-11 7:13 ` [PATCH 0/4] fsi: " Uwe Kleine-König
1 sibling, 0 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2024-03-05 21:20 UTC (permalink / raw)
To: Jeremy Kerr, Joel Stanley
Cc: Alistar Popple, Eddie James, Andrew Jeffery, linux-fsi,
linux-arm-kernel, linux-aspeed, 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/fsi/fsi-master-aspeed.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/fsi/fsi-master-aspeed.c b/drivers/fsi/fsi-master-aspeed.c
index f0a19cd451a0..b0b624c3717b 100644
--- a/drivers/fsi/fsi-master-aspeed.c
+++ b/drivers/fsi/fsi-master-aspeed.c
@@ -646,14 +646,12 @@ static int fsi_master_aspeed_probe(struct platform_device *pdev)
return rc;
}
-static int fsi_master_aspeed_remove(struct platform_device *pdev)
+static void fsi_master_aspeed_remove(struct platform_device *pdev)
{
struct fsi_master_aspeed *aspeed = platform_get_drvdata(pdev);
fsi_master_unregister(&aspeed->master);
clk_disable_unprepare(aspeed->clk);
-
- return 0;
}
static const struct of_device_id fsi_master_aspeed_match[] = {
@@ -668,7 +666,7 @@ static struct platform_driver fsi_master_aspeed_driver = {
.of_match_table = fsi_master_aspeed_match,
},
.probe = fsi_master_aspeed_probe,
- .remove = fsi_master_aspeed_remove,
+ .remove_new = fsi_master_aspeed_remove,
};
module_platform_driver(fsi_master_aspeed_driver);
--
2.43.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] 5+ messages in thread* Re: [PATCH 0/4] fsi: Convert to platform remove callback returning void
2024-03-05 21:20 [PATCH 0/4] fsi: Convert to platform remove callback returning void Uwe Kleine-König
2024-03-05 21:20 ` [PATCH 1/4] fsi: master-aspeed: " Uwe Kleine-König
@ 2024-04-11 7:13 ` Uwe Kleine-König
2024-04-29 7:21 ` Uwe Kleine-König
1 sibling, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2024-04-11 7:13 UTC (permalink / raw)
To: Jeremy Kerr, Joel Stanley
Cc: linux-aspeed, Alistar Popple, Eddie James, kernel, Andrew Jeffery,
linux-arm-kernel, linux-fsi
[-- Attachment #1.1: Type: text/plain, Size: 943 bytes --]
Hello,
On Tue, Mar 05, 2024 at 10:20:56PM +0100, Uwe Kleine-König wrote:
> this series converts all drivers below drivers/fsi to struct
> platform_driver::remove_new(). 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 their .remove() callbacks
> returned zero unconditionally.
>
> There are no interdependencies between these patches, so they could be
> picked up individually. But I'd hope that they get picked up all
> together.
I didn't get any feedback on this patch set. As the conversion of
platform_driver::remove depends on these, it would be great if they made
it in during the next merge window.
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] 5+ messages in thread* Re: [PATCH 0/4] fsi: Convert to platform remove callback returning void
2024-04-11 7:13 ` [PATCH 0/4] fsi: " Uwe Kleine-König
@ 2024-04-29 7:21 ` Uwe Kleine-König
2024-04-29 7:25 ` Jeremy Kerr
0 siblings, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2024-04-29 7:21 UTC (permalink / raw)
To: Jeremy Kerr, Joel Stanley
Cc: linux-aspeed, Alistar Popple, Eddie James, kernel, Andrew Jeffery,
linux-arm-kernel, linux-fsi, Greg Kroah-Hartman
[-- Attachment #1.1: Type: text/plain, Size: 1284 bytes --]
Hello,
On Thu, Apr 11, 2024 at 09:13:38AM +0200, Uwe Kleine-König wrote:
> On Tue, Mar 05, 2024 at 10:20:56PM +0100, Uwe Kleine-König wrote:
> > this series converts all drivers below drivers/fsi to struct
> > platform_driver::remove_new(). 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 their .remove() callbacks
> > returned zero unconditionally.
> >
> > There are no interdependencies between these patches, so they could be
> > picked up individually. But I'd hope that they get picked up all
> > together.
>
> I didn't get any feedback on this patch set. As the conversion of
> platform_driver::remove depends on these, it would be great if they made
> it in during the next merge window.
I intend to change platform_driver::remove soon after the next merge
window to let it cook in next for a while. If this patch set doesn't
make it in before, I'll send it together with the patch changing
platform_driver::remove to Greg.
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] 5+ messages in thread* Re: [PATCH 0/4] fsi: Convert to platform remove callback returning void
2024-04-29 7:21 ` Uwe Kleine-König
@ 2024-04-29 7:25 ` Jeremy Kerr
0 siblings, 0 replies; 5+ messages in thread
From: Jeremy Kerr @ 2024-04-29 7:25 UTC (permalink / raw)
To: Uwe Kleine-König, Joel Stanley
Cc: linux-aspeed, Alistar Popple, Eddie James, kernel, Andrew Jeffery,
linux-arm-kernel, linux-fsi, Greg Kroah-Hartman
Hi Uwe,
> I intend to change platform_driver::remove soon after the next merge
> window to let it cook in next for a while. If this patch set doesn't
> make it in before, I'll send it together with the patch changing
> platform_driver::remove to Greg.
Joel is somewhat-off at present, and the FSI changes typically go
through Greg anyway, so this all sounds fine to me.
In case it helps:
Acked-by: Jeremy Kerr <jk@ozlabs.org>
Cheers,
Jeremy
_______________________________________________
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] 5+ messages in thread
end of thread, other threads:[~2024-04-29 7:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-05 21:20 [PATCH 0/4] fsi: Convert to platform remove callback returning void Uwe Kleine-König
2024-03-05 21:20 ` [PATCH 1/4] fsi: master-aspeed: " Uwe Kleine-König
2024-04-11 7:13 ` [PATCH 0/4] fsi: " Uwe Kleine-König
2024-04-29 7:21 ` Uwe Kleine-König
2024-04-29 7:25 ` Jeremy Kerr
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).