libstub: Fix compilation warning for rv32
authorAlexandre Ghiti <alexghiti@rivosinc.com>
Sat, 22 Jul 2023 12:38:49 +0000 (14:38 +0200)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 6 Sep 2023 02:49:30 +0000 (19:49 -0700)
commit3c35d1a03c8b864f08088d51e121aa7c0067b146
treef3e0f821e70320ef66fb322dda8bb995ed20fc0c
parent6b56beb5f6940f0b77cb520263651328a8378efa
libstub: Fix compilation warning for rv32

Fix the following warning which appears when compiled for rv32 by using
unsigned long type instead of u64.

../drivers/firmware/efi/libstub/efi-stub-helper.c: In function 'efi_kaslr_relocate_kernel':
../drivers/firmware/efi/libstub/efi-stub-helper.c:846:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  846 |                            (u64)_end < EFI_ALLOC_LIMIT) {

Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Conor Dooley <conor.dooley@microchip.com>
Tested-by: Song Shuai <songshuaishuai@tinylab.org>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Tested-by: Sami Tolvanen <samitolvanen@google.com>
Link: https://lore.kernel.org/r/20230722123850.634544-5-alexghiti@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
drivers/firmware/efi/libstub/kaslr.c