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@gmail.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
||
|---|---|---|
| .. | ||
| nand | ||
| onenand | ||
| spi | ||
| ubi | ||
| ubispl | ||
| Kconfig | ||
| Makefile | ||
| altera_qspi.c | ||
| cfi_flash.c | ||
| cfi_mtd.c | ||
| jedec_flash.c | ||
| mtd-uclass.c | ||
| mtd_uboot.c | ||
| mtdconcat.c | ||
| mtdcore.c | ||
| mtdcore.h | ||
| mtdpart.c | ||
| mw_eeprom.c | ||
| pic32_flash.c | ||
| renesas_rpc_hf.c | ||
| st_smi.c | ||
| stm32_flash.c | ||
| stm32_flash.h | ||