[U-Boot] [PATCH] nand: atmel: Initialize pmecc smu with correct size

Bin Meng bmeng.cn at gmail.com
Mon Oct 22 10:06:53 UTC 2018


Hi Tom,

On Tue, Oct 9, 2018 at 3:47 PM Miquel Raynal <miquel.raynal at bootlin.com> wrote:
>
> Hi Bin,
>
> Bin Meng <bmeng.cn at gmail.com> wrote on Mon,  8 Oct 2018 02:27:44 -0700:
>
> > Currently in pmecc_get_sigma(), the code tries to clear the memory
> > pointed by smu with wrong size 'sizeof(int16_t) * ARRAY_SIZE(smu)'.
> > Since smu is actually a pointer, not an array, so ARRAY_SIZE(smu)
> > does not generate correct size to be cleared.
> >
> > In fact, GCC 8.1.0 reports a warning against it:
> >
> > error: division 'sizeof (int16_t * {aka short int *}) / sizeof (int16_t
> > {aka short int})' does not compute the number of array elements
> > [-Werror=sizeof-pointer-div]
> >
> > Fix it by using the correct size.
> >
> > Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
> > ---
> >
>
> It's curious that the code of this driver differs a lot from its Linux
> cousin. Anyway this looks fine by me. Maybe a Fixes tag would be
> great.
>
> Reviewed-by: Miquel Raynal <miquel.raynal at bootlin.com>
>

Will you take this for this release?

Regards,
Bin


More information about the U-Boot mailing list