x86: Fix warning about cast from pointer to integer of different size
authorAlexander Duyck <alexander.h.duyck@intel.com>
Mon, 19 Nov 2012 18:31:37 +0000 (10:31 -0800)
committerH. Peter Anvin <hpa@linux.intel.com>
Mon, 19 Nov 2012 18:45:19 +0000 (10:45 -0800)
This patch fixes a warning reported by the kbuild test robot where we were
casting a pointer to a physical address which represents an integer of a
different size.  Per the suggestion of Peter Anvin I am replacing it and one
other spot where I made a similar cast with an unsigned long.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Link: http://lkml.kernel.org/r/20121119182927.3655.7641.stgit@ahduyck-cp1.jf.intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/kernel/head32.c
arch/x86/kernel/head64.c

index f15db0c407133b70816b1177565b777d3354dbd7..e175548329915e23ddef8f6dae39fdfe68d73100 100644 (file)
@@ -31,7 +31,7 @@ static void __init i386_default_early_setup(void)
 void __init i386_start_kernel(void)
 {
        memblock_reserve(__pa_symbol(_text),
-                        (phys_addr_t)__bss_stop - (phys_addr_t)_text);
+                        (unsigned long)__bss_stop - (unsigned long)_text);
 
 #ifdef CONFIG_BLK_DEV_INITRD
        /* Reserve INITRD */
index 42f5df1343413d9fb0978c54e30e3b15705179bc..7b215a50ec1e21efb7c520325d0d039c1ba24844 100644 (file)
@@ -98,7 +98,7 @@ void __init x86_64_start_reservations(char *real_mode_data)
        copy_bootdata(__va(real_mode_data));
 
        memblock_reserve(__pa_symbol(_text),
-                        (phys_addr_t)__bss_stop - (phys_addr_t)_text);
+                        (unsigned long)__bss_stop - (unsigned long)_text);
 
 #ifdef CONFIG_BLK_DEV_INITRD
        /* Reserve INITRD */