Re: [PATCH] platform: Make platform_driver::remove() return void

From: Greg Kroah-Hartman
Date: Tue Jun 04 2024 - 12:33:00 EST


On Mon, May 27, 2024 at 10:34:15AM +0200, Uwe Kleine-König wrote:
> struct platform_driver::remove returning an integer made driver authors
> expect that returning an error code was proper error handling. However
> the driver core ignores the error and continues to remove the device
> because there is nothing the core could do anyhow and reentering the
> remove callback again is only calling for trouble.
>
> To prevent such wrong assumptions, change the return type of the remove
> callback to void. This was prepared by introducing an alternative remove
> callback returning void and converting all drivers to that. So .remove()
> can be changed without further changes in drivers.
>
> This corresponds to step b) of the plan outlined in commit
> 5c5a7680e67b ("platform: Provide a remove callback that returns no value").
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> ---
> Hello Greg,
>
> there are only very little platform drivers left in v6.10-rc1 that need
> to be changed to .remove_new() before this patch can be applied. They
> were all sent out to the respective maintainers, most of them suggested
> to apply the patches together with this one.
>
> You can fetch this patch together with all necessary commits from:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git platform-remove-void
>
> If you have no concerns, I can also provide you a signed tag for
> pulling. I think that's easier than indiviually applying them, but I can
> also send out the complete series if you prefer.

A signed tag is good, I can just pull from that, thanks!

greg k-h