[u-boot][PATCH 05/14] mtd: rawnand: omap_gpmc: Fix BCH6/16 HW based correction

Dario Binacchi dario.binacchi at amarulasolutions.com
Wed Nov 30 09:11:53 CET 2022


Hi Tom,

On Tue, Nov 29, 2022 at 5:18 PM Tom Rini <trini at konsulko.com> wrote:
>
> On Tue, Nov 29, 2022 at 04:25:13PM +0100, Dario Binacchi wrote:
> > Hi Roger,
> >
> > On Tue, Oct 11, 2022 at 1:50 PM Roger Quadros <rogerq at kernel.org> wrote:
> > >
> > > The BCH detection hardware can generate ECC bytes for multiple
> > > sectors in one go. Use that feature.
> > >
> > > correct() only corrects one sector at a time so we need to call it
> > > repeatedly for each sector.
> > >
> > > Signed-off-by: Roger Quadros <rogerq at kernel.org>
> [snip]
> > > +/**
> > > + * omap_calculate_ecc_bch - ECC generator for 1 sector
> > > + * @mtd:        MTD device structure
> > > + * @dat:       The pointer to data on which ecc is computed
> > > + * @ecc_code:  The ecc_code buffer
> > > + *
> > > + * Support calculating of BCH4/8/16 ECC vectors for one sector. This is used
> > > + * when SW based correction is required as ECC is required for one sector
> > > + * at a time.
> > > + */
> > > +static int omap_calculate_ecc_bch(struct mtd_info *mtd,
> > > +                                 const u_char *dat, u_char *ecc_calc)
> >
> > Please add __maybe_unused. Without it the CI/CD pipeline fails:
> >
> >        arm:  +   devkit8000
> > +drivers/mtd/nand/raw/omap_gpmc.c:442:12: error:
> > 'omap_calculate_ecc_bch' defined but not used
> > [-Werror=unused-function]
> > +  442 | static int omap_calculate_ecc_bch(struct mtd_info *mtd,
> > +      |            ^~~~~~~~~~~~~~~~~~~~~~
> > +cc1: all warnings being treated as errors
>
> While not a firm rule, a general suggestion is if it's easy to fix a CI
> error like this, do so (and add Signed-off-by tag) during testing a PR
> rather than ask for a resubmit.  Unless there's other more complex
> changes needed as well.

I'll do it. Thanks for the suggestion and the explanation.
Best regards,
Dario
>
> --
> Tom



-- 

Dario Binacchi

Embedded Linux Developer

dario.binacchi at amarulasolutions.com

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
info at amarulasolutions.com

www.amarulasolutions.com


More information about the U-Boot mailing list