Re: [PATCH] sh: push-switch: Convert to platform remove callback returning void

Uwe Kleine-König <[email protected]>
Newsgroups gmane.linux.ports.sh.devel
Message-ID <fwfwlvyuznwzwejg3iqvnvgolxaqfo3aod5gbydgbwpj5l4xmr@y7fuszpv7kry>
Hello,

[corrected the address of the Pengutronix kernel team in Cc:]

On Wed, Mar 06, 2024 at 10:19:47PM +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.

Apart from Geert's positive review reply I didn't get any feedback on
this patch and it didn't appear in next yet.

As my quest to change the prototype of struct platform_driver::remove
depends on these patches, 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/ |
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmYXjsUACgkQj4D7WH0S
/k4qAAf/T7b0RcHiZWZXsUFarnZfVBJwf5vfhftNJbAzHvUNOC+4r2ABt+pd43md
9lusIQKMVAiy1Yq6zBobyikl98I0gtQj86fgjX5LlWDpDfJEe6MWoBtk4raEzo6O
Pf74K9RcLncNIRNJcOBhY7QKgj+63FsT2ay7ZFTXKLNkwstuZ7/6AevbonGo9w+V
9KRtC3ovM+DVvcVa/BpEvXahOvo3FSeFlHk2maXdxjOJusvph0kG1/1YzNDHjyDz
MmkKF9QfU/105hGg64tsPGGYmYJjWnd8rqbYYCT9dAZ4LU8BjUBmNVIoM6waXN4z
OBuexQB61n9RUKsErH4N26uKYFF3vg==
=eC12
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.