diff options
| author | Arnd Bergmann <[email protected]> | 2021-06-28 19:33:41 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2021-06-29 10:53:45 -0700 |
| commit | c5f320ff8a79501bb59338278336ec43acb9d7e2 (patch) | |
| tree | 7f879b3c96886e19531f32019b825d8d0e134e6e /scripts | |
| parent | f589c67ff08c82405f3e69603ac159ea76933a50 (diff) | |
ia64: mca_drv: fix incorrect array size calculation
gcc points out a mistake in the mca driver that goes back to before the
git history:
arch/ia64/kernel/mca_drv.c: In function 'init_record_index_pools':
arch/ia64/kernel/mca_drv.c:346:54: error: expression does not compute the number of elements in this array; element typ
e is 'int', not 'size_t' {aka 'long unsigned int'} [-Werror=sizeof-array-div]
346 | for (i = 1; i < sizeof sal_log_sect_min_sizes/sizeof(size_t); i++)
| ^
This is the same as sizeof(size_t), which is two shorter than the actual
array. Use the ARRAY_SIZE() macro to get the correct calculation instead.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Cc: Randy Dunlap <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions