diff options
author | Jisheng Zhang <[email protected]> | 2023-07-10 01:10:36 +0800 |
---|---|---|
committer | Palmer Dabbelt <[email protected]> | 2023-07-12 07:44:00 -0700 |
commit | b690e266dae2f85f4dfea21fa6a05e3500a51054 (patch) | |
tree | 103025bfbfbe87f246dfb6d8bbd1a8b933ed5d00 /lib/test-string_helpers.c | |
parent | 66843b14fb71825fdd73ab12f6594f2243b402be (diff) |
riscv: mm: fix truncation warning on RV32
lkp reports below sparse warning when building for RV32:
arch/riscv/mm/init.c:1204:48: sparse: warning: cast truncates bits from
constant value (100000000 becomes 0)
IMO, the reason we didn't see this truncates bug in real world is "0"
means MEMBLOCK_ALLOC_ACCESSIBLE in memblock and there's no RV32 HW
with more than 4GB memory.
Fix it anyway to make sparse happy.
Fixes: decf89f86ecd ("riscv: try to allocate crashkern region from 32bit addressible memory")
Signed-off-by: Jisheng Zhang <[email protected]>
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions