[PATCH 1/7] mtd: replace name of 'rfree' field with 'free' in struct mtd_ooblayout_ops to better match it's description
Simon Glass
sjg at chromium.org
Mon Dec 5 17:11:41 CET 2022
Hi Frieder,
On Fri, 25 Nov 2022 at 04:09, Frieder Schrempf
<frieder.schrempf at kontron.de> wrote:
>
> On 07.10.22 13:58, Fabio Estevam wrote:
> > On Fri, Oct 7, 2022 at 8:34 AM Michael Nazzareno Trimarchi
> > <michael at amarulasolutions.com> wrote:
> >
> >> About this change, there was a commit from Simon 8d38a8459b0
> >> that was renamed. You ask basically to revert it
> >
> > Correct, what about fixing it like this?
> >
> > diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
> > index ff635bd716..09f5269887 100644
> > --- a/include/linux/mtd/mtd.h
> > +++ b/include/linux/mtd/mtd.h
> > @@ -122,7 +122,7 @@ struct mtd_oob_region {
> > * @ecc: function returning an ECC region in the OOB area.
> > * Should return -ERANGE if %section exceeds the total number of
> > * ECC sections.
> > - * @free: function returning a free region in the OOB area.
> > + * @rfree: function returning a free region in the OOB area.
> > * Should return -ERANGE if %section exceeds the total number of
> > * free sections.
> > */
>
> But do we really want to stay out of sync with the Linux kernel code? Is
> the reasoning behind Simon's change in 8d38a8459b0 still valid today?
See here:
https://patchwork.ozlabs.org/project/uboot/cover/20200203143618.74619-1-sjg@chromium.org/
I don't believe this patch even builds for sandbox:
drivers/mtd/mtdcore.c: In function ‘mtd_ooblayout_free’:
drivers/mtd/mtdcore.c:1214:58: error: macro "free" passed 3 arguments,
but takes just 1
1214 | return mtd->ooblayout->free(mtd, section, oobfree);
See malloc.h for the #define for free()
Regards,
Simon
More information about the U-Boot
mailing list