diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2018-10-08 02:27:44 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-10-22 09:18:49 -0400 |
commit | ed5df0852f56a3512db283010ad7b6e93cba0612 (patch) | |
tree | e28915afa8bca698afbdb13fc7a376eb837cbfe0 /arch | |
parent | 7702713ee8d2f6a9fbd66894ec2995856f7507dc (diff) |
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.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions