Re: [PATCH] mtd: nand: Convert to platform remove callback returning void

Miquel Raynal <[email protected]> Tue, 11 Apr 2023 10:20:25 +0200
Newsgroups io.groups.linux-oxnas,dev.linux.lists.linux-sunxi,org.infradead.lists.linux-amlogic,org.infradead.lists.linux-mediatek,org.infradead.lists.linux-mtd,org.infradead.lists.linux-rockchip,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-mips,org.kernel.vger.linux-renesas-soc,org.kernel.vger.linux-tegra
Message-ID <20230411102025.6b2fdc9e@xps-13>
Hi Uwe,

[email protected] wrote on Sat, 8 Apr 2023 20:53:32 +0200:

> 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 (mostly) ignored
> 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.
>=20
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
>=20
> Acked-by: Nicolas Ferre <[email protected]>
> Reviewed-by: Paul Cercueil <[email protected]>
> Reviewed-by: Philippe Mathieu-Daud=C3=A9 <[email protected]>
> Acked-by: Martin Blumenstingl <[email protected]>
> Reviewed-by: Martin Blumenstingl <[email protected]>
> Acked-by: Roger Quadros <[email protected]>
> Reviewed-by: Geert Uytterhoeven <[email protected]>
> Reviewed-by: Heiko Stuebner <[email protected]>
> Acked-by: Jernej Skrabec <[email protected]>
> Acked-by: Thierry Reding <[email protected]>
> Signed-off-by: Uwe Kleine-K=C3=B6nig <[email protected]>
> ---
>=20
> Hey Miquel,
>=20
> On Fri, Apr 07, 2023 at 10:10:43AM +0200, Miquel Raynal wrote:
> > I've looked at the different patches, they look good to me but as they
> > are all trivial and exactly identical, would you mind sending this
> > again all squashed in a single patch? A subsystem-wide conversion seems
> > appropriate. In all cases I plan to take this for the next merge
> > window. =20
>=20
> I slightly prefer them separately, because I like small patches and
> because the Acks and Reviews only apply to the individual drivers.
> But I don't mind seriously, so here comes the series squashed into one.

For any non trivial change, I would definitely do that as well.

The thing is, by collecting the tags with b4, you lost all the Acks and
Reviews targets, while we could prevent this, see below.

> While going through the changed, probably the s3c24xx driver (which
> isn't exactly identical to the other changes) could benefit from an
> additional change throwing out the early exit (which---I guess---cannot
> be hit).

Yes, I believe the 'info =3D=3D NULL' condition is useless, feel free to
drop it in a second patch if you wish.

> BTW, I constructed the lists of acks/reviews myself and found the same
> set. However b4 wailed about each patch claiming:
>=20
> 	    =E2=9C=97 BADSIG: DKIM/infradead.org

No idea what this means, any pointer?

> And it didn't like you producing the tags, saying:
>=20
> 	NOTE: some trailers ignored due to from/email mismatches:
> 	    ! Trailer: Acked-by: Roger Quadros <[email protected]>
> 	     Msg From: Miquel Raynal <[email protected]>
> 	    [...]

Well, yes, I don't expect b4 to read plain english when I say "I
collected them for you" ^^ But at least my list had a '# <area>' suffix
for each of the Acked and Reviewed changes, which is now missing. I
don't know  how useful they actually are, but it seems to me that the
information was lost between v1 and v2?

Thanks,
Miqu=C3=A8l