* [PATCH 7/8] intel_th: Convert to platform remove callback returning void [not found] <20231107202818.4005791-1-u.kleine-koenig@pengutronix.de> @ 2023-11-07 20:28 ` Uwe Kleine-König 2024-01-10 8:41 ` Uwe Kleine-König 0 siblings, 1 reply; 11+ messages in thread From: Uwe Kleine-König @ 2023-11-07 20:28 UTC (permalink / raw) To: Alexander Shishkin; +Cc: kernel, linux-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/hwtracing/intel_th/acpi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/hwtracing/intel_th/acpi.c b/drivers/hwtracing/intel_th/acpi.c index 87f9024e4bbb..503620e9fd10 100644 --- a/drivers/hwtracing/intel_th/acpi.c +++ b/drivers/hwtracing/intel_th/acpi.c @@ -60,18 +60,16 @@ static int intel_th_acpi_probe(struct platform_device *pdev) return 0; } -static int intel_th_acpi_remove(struct platform_device *pdev) +static void intel_th_acpi_remove(struct platform_device *pdev) { struct intel_th *th = platform_get_drvdata(pdev); intel_th_free(th); - - return 0; } static struct platform_driver intel_th_acpi_driver = { .probe = intel_th_acpi_probe, - .remove = intel_th_acpi_remove, + .remove_new = intel_th_acpi_remove, .driver = { .name = DRIVER_NAME, .acpi_match_table = intel_th_acpi_ids, -- 2.42.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 7/8] intel_th: Convert to platform remove callback returning void 2023-11-07 20:28 ` [PATCH 7/8] intel_th: Convert to platform remove callback returning void Uwe Kleine-König @ 2024-01-10 8:41 ` Uwe Kleine-König 2024-02-15 21:16 ` Uwe Kleine-König 0 siblings, 1 reply; 11+ messages in thread From: Uwe Kleine-König @ 2024-01-10 8:41 UTC (permalink / raw) To: Alexander Shishkin; +Cc: kernel, linux-kernel [-- Attachment #1: Type: text/plain, Size: 1154 bytes --] Hello, On Tue, Nov 07, 2023 at 09:28:26PM +0100, 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 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> I didn't get any feedback to this patch and it didn't make it into next up to now. Is this still on someone's radar? 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] 11+ messages in thread
* Re: [PATCH 7/8] intel_th: Convert to platform remove callback returning void 2024-01-10 8:41 ` Uwe Kleine-König @ 2024-02-15 21:16 ` Uwe Kleine-König 2024-02-21 7:19 ` Uwe Kleine-König 0 siblings, 1 reply; 11+ messages in thread From: Uwe Kleine-König @ 2024-02-15 21:16 UTC (permalink / raw) To: Alexander Shishkin; +Cc: linux-kernel, kernel [-- Attachment #1: Type: text/plain, Size: 1517 bytes --] Hello Alexander, On Wed, Jan 10, 2024 at 09:41:54AM +0100, Uwe Kleine-König wrote: > Hello, > > On Tue, Nov 07, 2023 at 09:28:26PM +0100, 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 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> > > I didn't get any feedback to this patch and it didn't make it into next > up to now. > > Is this still on someone's radar? Is there a chance to get this patch into v6.9-rc1? Are you the right one to talk to about this patch? (According to MAINTAINERS you are.) The patch was sent during the 6.7 merge window and now already missed the 6.8 one :-\ 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] 11+ messages in thread
* Re: [PATCH 7/8] intel_th: Convert to platform remove callback returning void 2024-02-15 21:16 ` Uwe Kleine-König @ 2024-02-21 7:19 ` Uwe Kleine-König 2024-02-21 18:50 ` Alexander Shishkin 0 siblings, 1 reply; 11+ messages in thread From: Uwe Kleine-König @ 2024-02-21 7:19 UTC (permalink / raw) To: Alexander Shishkin, Greg Kroah-Hartman; +Cc: linux-kernel, kernel [-- Attachment #1: Type: text/plain, Size: 1965 bytes --] Hello Greg, On Thu, Feb 15, 2024 at 10:16:41PM +0100, Uwe Kleine-König wrote: > On Wed, Jan 10, 2024 at 09:41:54AM +0100, Uwe Kleine-König wrote: > > On Tue, Nov 07, 2023 at 09:28:26PM +0100, 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 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> > > > > I didn't get any feedback to this patch and it didn't make it into next > > up to now. > > > > Is this still on someone's radar? > > Is there a chance to get this patch into v6.9-rc1? Are you the right one > to talk to about this patch? (According to MAINTAINERS you are.) > > The patch was sent during the 6.7 merge window and now already missed > the 6.8 one :-\ I failed in several attempts to get feedback on this patch. You applied the last two patches for this driver (that is all patches since the driver was born). Would you care for that one, too? Tell me if you want a resend. Note that the other 7 patches from this series are already cared for, so if you're using b4 am or shazam, make use of -P7. Thanks 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] 11+ messages in thread
* Re: [PATCH 7/8] intel_th: Convert to platform remove callback returning void 2024-02-21 7:19 ` Uwe Kleine-König @ 2024-02-21 18:50 ` Alexander Shishkin 2024-04-11 7:07 ` Uwe Kleine-König 0 siblings, 1 reply; 11+ messages in thread From: Alexander Shishkin @ 2024-02-21 18:50 UTC (permalink / raw) To: Uwe Kleine-König, Greg Kroah-Hartman Cc: linux-kernel, kernel, alexander.shishkin Uwe Kleine-König <u.kleine-koenig@pengutronix.de> writes: > Hello Greg, > > On Thu, Feb 15, 2024 at 10:16:41PM +0100, Uwe Kleine-König wrote: >> On Wed, Jan 10, 2024 at 09:41:54AM +0100, Uwe Kleine-König wrote: >> > On Tue, Nov 07, 2023 at 09:28:26PM +0100, 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 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> >> > >> > I didn't get any feedback to this patch and it didn't make it into next >> > up to now. >> > >> > Is this still on someone's radar? >> >> Is there a chance to get this patch into v6.9-rc1? Are you the right one >> to talk to about this patch? (According to MAINTAINERS you are.) >> >> The patch was sent during the 6.7 merge window and now already missed >> the 6.8 one :-\ > > I failed in several attempts to get feedback on this patch. You applied > the last two patches for this driver (that is all patches since the > driver was born). Would you care for that one, too? Tell me if you want > a resend. Note that the other 7 patches from this series are already > cared for, so if you're using b4 am or shazam, make use of -P7. Apologies. This looks good to me, I will pick it up for my next submission to Greg unless somebody objects. Regards, -- Alex ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 7/8] intel_th: Convert to platform remove callback returning void 2024-02-21 18:50 ` Alexander Shishkin @ 2024-04-11 7:07 ` Uwe Kleine-König 2024-04-15 6:48 ` Alexander Shishkin 0 siblings, 1 reply; 11+ messages in thread From: Uwe Kleine-König @ 2024-04-11 7:07 UTC (permalink / raw) To: Alexander Shishkin, Greg Kroah-Hartman; +Cc: linux-kernel, kernel [-- Attachment #1: Type: text/plain, Size: 2606 bytes --] Hello Alex, On Wed, Feb 21, 2024 at 08:50:32PM +0200, Alexander Shishkin wrote: > Uwe Kleine-König <u.kleine-koenig@pengutronix.de> writes: > > On Thu, Feb 15, 2024 at 10:16:41PM +0100, Uwe Kleine-König wrote: > >> On Wed, Jan 10, 2024 at 09:41:54AM +0100, Uwe Kleine-König wrote: > >> > On Tue, Nov 07, 2023 at 09:28:26PM +0100, 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 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> > >> > > >> > I didn't get any feedback to this patch and it didn't make it into next > >> > up to now. > >> > > >> > Is this still on someone's radar? > >> > >> Is there a chance to get this patch into v6.9-rc1? Are you the right one > >> to talk to about this patch? (According to MAINTAINERS you are.) > >> > >> The patch was sent during the 6.7 merge window and now already missed > >> the 6.8 one :-\ > > > > I failed in several attempts to get feedback on this patch. You applied > > the last two patches for this driver (that is all patches since the > > driver was born). Would you care for that one, too? Tell me if you want > > a resend. Note that the other 7 patches from this series are already > > cared for, so if you're using b4 am or shazam, make use of -P7. > > Apologies. This looks good to me, I will pick it up for my next > submission to Greg unless somebody objects. Given there are not that many patches left (~50) as of today's next, I'd like to see this patch going in during the next merge window, that I can finalize the (next step of the) quest around platform_driver::remove. Is sending this patch to Greg still on your todo list? 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] 11+ messages in thread
* Re: [PATCH 7/8] intel_th: Convert to platform remove callback returning void 2024-04-11 7:07 ` Uwe Kleine-König @ 2024-04-15 6:48 ` Alexander Shishkin 2024-04-29 7:13 ` Uwe Kleine-König 0 siblings, 1 reply; 11+ messages in thread From: Alexander Shishkin @ 2024-04-15 6:48 UTC (permalink / raw) To: Uwe Kleine-König, Greg Kroah-Hartman Cc: linux-kernel, kernel, alexander.shishkin Uwe Kleine-König <u.kleine-koenig@pengutronix.de> writes: > Hello Alex, Hi Uwe, > Given there are not that many patches left (~50) as of today's next, I'd > like to see this patch going in during the next merge window, that I can > finalize the (next step of the) quest around platform_driver::remove. > > Is sending this patch to Greg still on your todo list? Yes, as soon as I finalize other patches on my series. Should be soon. Regards, -- Alex ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 7/8] intel_th: Convert to platform remove callback returning void 2024-04-15 6:48 ` Alexander Shishkin @ 2024-04-29 7:13 ` Uwe Kleine-König 2024-04-29 12:22 ` Alexander Shishkin 0 siblings, 1 reply; 11+ messages in thread From: Uwe Kleine-König @ 2024-04-29 7:13 UTC (permalink / raw) To: Alexander Shishkin; +Cc: Greg Kroah-Hartman, linux-kernel, kernel [-- Attachment #1: Type: text/plain, Size: 1154 bytes --] Hello Alex, On Mon, Apr 15, 2024 at 09:48:27AM +0300, Alexander Shishkin wrote: > Uwe Kleine-König <u.kleine-koenig@pengutronix.de> writes: > > Given there are not that many patches left (~50) as of today's next, I'd > > like to see this patch going in during the next merge window, that I can > > finalize the (next step of the) quest around platform_driver::remove. > > > > Is sending this patch to Greg still on your todo list? > > Yes, as soon as I finalize other patches on my series. Should be soon. I know neither your nor Greg's plans, but I wonder if this patch will make it into v6.10-rc1 given that it still didn't land in next yet. I intend to change the prototype of platform_driver::remove() after the merge window leading to v6.10-rc1 closes to cook in next for some time. If this patch doesn't make it into the mainline before, I'll send it together with the change adapting the remove callback. That will go in via Greg's tree, too. 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] 11+ messages in thread
* Re: [PATCH 7/8] intel_th: Convert to platform remove callback returning void 2024-04-29 7:13 ` Uwe Kleine-König @ 2024-04-29 12:22 ` Alexander Shishkin 2024-04-29 12:30 ` Alexander Shishkin 0 siblings, 1 reply; 11+ messages in thread From: Alexander Shishkin @ 2024-04-29 12:22 UTC (permalink / raw) To: Uwe Kleine-König Cc: Greg Kroah-Hartman, linux-kernel, kernel, alexander.shishkin Uwe Kleine-König <u.kleine-koenig@pengutronix.de> writes: > Hello Alex, Hi Uwe, > On Mon, Apr 15, 2024 at 09:48:27AM +0300, Alexander Shishkin wrote: >> Uwe Kleine-König <u.kleine-koenig@pengutronix.de> writes: >> > Given there are not that many patches left (~50) as of today's next, I'd >> > like to see this patch going in during the next merge window, that I can >> > finalize the (next step of the) quest around platform_driver::remove. >> > >> > Is sending this patch to Greg still on your todo list? >> >> Yes, as soon as I finalize other patches on my series. Should be soon. > > I know neither your nor Greg's plans, but I wonder if this patch will > make it into v6.10-rc1 given that it still didn't land in next yet. I've just sent my series [0]. > I intend to change the prototype of platform_driver::remove() after the > merge window leading to v6.10-rc1 closes to cook in next for some time. > If this patch doesn't make it into the mainline before, I'll send it > together with the change adapting the remove callback. That will go in > via Greg's tree, too. I saw that you included this patch with your series earlier today, so I dropped it from my series [0]. FWIW, you can add Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> to that patch if it helps. If you want me to pick it up again, let me know. Apologies for the repeated tardiness in handling this. [0] https://lore.kernel.org/all/20240429120908.3723458-1-alexander.shishkin@linux.intel.com/ Regards, -- Alex ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 7/8] intel_th: Convert to platform remove callback returning void 2024-04-29 12:22 ` Alexander Shishkin @ 2024-04-29 12:30 ` Alexander Shishkin 2024-04-29 13:07 ` Alexander Shishkin 0 siblings, 1 reply; 11+ messages in thread From: Alexander Shishkin @ 2024-04-29 12:30 UTC (permalink / raw) To: Uwe Kleine-König Cc: Greg Kroah-Hartman, linux-kernel, kernel, alexander.shishkin Alexander Shishkin <alexander.shishkin@linux.intel.com> writes: > Uwe Kleine-König <u.kleine-koenig@pengutronix.de> writes: >> I intend to change the prototype of platform_driver::remove() after the >> merge window leading to v6.10-rc1 closes to cook in next for some time. >> If this patch doesn't make it into the mainline before, I'll send it >> together with the change adapting the remove callback. That will go in >> via Greg's tree, too. > > I saw that you included this patch with your series earlier today, so I Wait, did I hallucinate this? I can't find your new series now. Ugh. If so, I'll put your patch back in and re-send my series right away. Regards, -- Alex ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 7/8] intel_th: Convert to platform remove callback returning void 2024-04-29 12:30 ` Alexander Shishkin @ 2024-04-29 13:07 ` Alexander Shishkin 0 siblings, 0 replies; 11+ messages in thread From: Alexander Shishkin @ 2024-04-29 13:07 UTC (permalink / raw) To: Uwe Kleine-König Cc: Greg Kroah-Hartman, linux-kernel, kernel, alexander.shishkin Alexander Shishkin <alexander.shishkin@linux.intel.com> writes: > Alexander Shishkin <alexander.shishkin@linux.intel.com> writes: > >> Uwe Kleine-König <u.kleine-koenig@pengutronix.de> writes: >>> I intend to change the prototype of platform_driver::remove() after the >>> merge window leading to v6.10-rc1 closes to cook in next for some time. >>> If this patch doesn't make it into the mainline before, I'll send it >>> together with the change adapting the remove callback. That will go in >>> via Greg's tree, too. >> >> I saw that you included this patch with your series earlier today, so I > > Wait, did I hallucinate this? I can't find your new series now. Ugh. > If so, I'll put your patch back in and re-send my series right away. Series re-sent [0]. Sorry for the mess. [0] https://lore.kernel.org/all/20240429130119.1518073-1-alexander.shishkin@linux.intel.com/ Regards, -- Alex ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-04-29 13:07 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20231107202818.4005791-1-u.kleine-koenig@pengutronix.de>
2023-11-07 20:28 ` [PATCH 7/8] intel_th: Convert to platform remove callback returning void Uwe Kleine-König
2024-01-10 8:41 ` Uwe Kleine-König
2024-02-15 21:16 ` Uwe Kleine-König
2024-02-21 7:19 ` Uwe Kleine-König
2024-02-21 18:50 ` Alexander Shishkin
2024-04-11 7:07 ` Uwe Kleine-König
2024-04-15 6:48 ` Alexander Shishkin
2024-04-29 7:13 ` Uwe Kleine-König
2024-04-29 12:22 ` Alexander Shishkin
2024-04-29 12:30 ` Alexander Shishkin
2024-04-29 13:07 ` Alexander Shishkin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox