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

Roger Quadros rogerq at kernel.org
Thu Dec 1 12:42:30 CET 2022



On 30/11/2022 10:11, Dario Binacchi wrote:
> 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.

Thanks for saving me from a re-spin. :)

--
cheers,
-roger


More information about the U-Boot mailing list