u-boot/arch/x86
Heinrich Schuchardt 97401d0dbc 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>
2021-03-09 09:42:12 +08:00
..
cpu x86: sizeof-array-div error in lpc_common_early_init 2021-03-09 09:42:12 +08:00
dts x86: coral: Add a devicetree node for eMMC 2021-02-01 15:11:41 +08:00
include/asm common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
lib common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
config.mk kconfig / kbuild: Re-sync with Linux 4.19 2020-04-10 11:18:32 -04:00
Kconfig x86: Support Atom SoCs using SWSMISCI rather than the SWSCI 2020-09-25 11:27:18 +08:00
Makefile x86: Allow 16-bit init to be in TPL 2019-05-08 13:02:13 +08:00