Home
last modified time | relevance | path

Searched hist:adf2f01f99a2cc841d251759fad213e9678bdc30 (Results 1 – 1 of 1) sorted by relevance

/rk3399_rockchip-uboot/drivers/mtd/nand/raw/
H A Datmel_nand.cadf2f01f99a2cc841d251759fad213e9678bdc30 Mon Oct 08 09:27:44 UTC 2018 Bin Meng <bmeng.cn@gmail.com> UPSTREAM: nand: atmel: Initialize pmecc smu with correct size

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.

Change-Id: I9a74b5a51c848cec7b54443449cb00609df00b39
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit ed5df0852f56a3512db283010ad7b6e93cba0612)