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

Tom Rini trini at konsulko.com
Tue Nov 29 17:17:59 CET 2022


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.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20221129/625b0c58/attachment.sig>


More information about the U-Boot mailing list