[PATCH] efi/libstub: arm*: double cast memory_map to hide compiler warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"efi/libstub: arm*: Pass latest memory map to the kernel" added a new
call to update fdt in-place. This caused a new warning on 32bit ARM:

../drivers/firmware/efi/libstub/fdt.c: In function 'allocate_new_fdt_and_exit_boot':
../drivers/firmware/efi/libstub/fdt.c:303:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
         (u64)memory_map, (u32)map_size);
         ^

Cast to an integer of native pointer size first.

Reported-by: kbuild test robot <fengguang.wu@xxxxxxxxx>
Signed-off-by: James Morse <james.morse@xxxxxxx>
---
I guess this too needs to go to stable unless you intend to squash it?

 drivers/firmware/efi/libstub/fdt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/libstub/fdt.c b/drivers/firmware/efi/libstub/fdt.c
index 6d33d70..9b11b05 100644
--- a/drivers/firmware/efi/libstub/fdt.c
+++ b/drivers/firmware/efi/libstub/fdt.c
@@ -300,7 +300,8 @@ efi_status_t allocate_new_fdt_and_exit_boot(efi_system_table_t *sys_table,
 		efi_set_virtual_address_map_t *svam;
 
 		status = update_fdt_memmap((void *)*new_fdt_addr,
-					   (u64)memory_map, (u32)map_size);
+					   (u64)(unsigned long)memory_map,
+					   (u32)map_size);
 		if (status != EFI_SUCCESS) {
 			/*
 			 * The kernel won't get far without the memory map, but
-- 
2.10.1

--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux