diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2021-02-20 10:05:24 +0100 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2021-03-09 09:42:12 +0800 |
commit | 97401d0dbcd71d34fee95e3d89736699e78a9c6b (patch) | |
tree | 592951956700e9725a130f13fc8bc790caa71ea3 /drivers/ddr/marvell/a38x/ddr3_init.c | |
parent | 472c5484bca41a477f8b86a263e559f6e992c7f8 (diff) | |
download | u-boot-97401d0dbcd71d34fee95e3d89736699e78a9c6b.tar.gz u-boot-97401d0dbcd71d34fee95e3d89736699e78a9c6b.tar.xz u-boot-97401d0dbcd71d34fee95e3d89736699e78a9c6b.zip |
x86: sizeof-array-div error in lpc_common_early_init
Building qemu-x86_64_defconfig with GCC 11.0 fails with:
arch/x86/cpu/intel_common/lpc.c:
In function ‘lpc_common_early_init’:
arch/x86/cpu/intel_common/lpc.c:56:40:
error: expression does not compute the number of elements in this array;
element type is ‘struct reg_info’, not ‘u32’ {aka ‘unsigned int’}
[-Werror=sizeof-array-div]
56 | sizeof(values) / sizeof(u32));
| ^
arch/x86/cpu/intel_common/lpc.c:56:40: note: add parentheses around the
second ‘sizeof’ to silence this warning
arch/x86/cpu/intel_common/lpc.c:50:11: note: array ‘values’ declared here
50 | } values[4], *ptr;
| ^~~~~~
Add parentheses to silence warning.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/ddr/marvell/a38x/ddr3_init.c')
0 files changed, 0 insertions, 0 deletions