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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Uwe,

u.kleine-koenig@xxxxxxxxxxxxxx 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.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Acked-by: Nicolas Ferre <nicolas.ferre@xxxxxxxxxxxxx>
> Reviewed-by: Paul Cercueil <paul@xxxxxxxxxxxxxxx>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
> Acked-by: Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx>
> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx>
> Acked-by: Roger Quadros <rogerq@xxxxxxxxxx>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> Reviewed-by: Heiko Stuebner <heiko@xxxxxxxxx>
> Acked-by: Jernej Skrabec <jernej.skrabec@xxxxxxxxx>
> Acked-by: Thierry Reding <treding@xxxxxxxxxx>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> ---
> 
> Hey Miquel,
> 
> 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.  
> 
> 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 == 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:
> 
> 	    ✗ BADSIG: DKIM/infradead.org

No idea what this means, any pointer?

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

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èl




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux