x86: Fix warning about cast from pointer to integer of different size
PATCH 1/1 x86: Fix warning about cast from pointer to integer of different size
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.
--- arch/x86/kernel/head32.c | 2 +- arch/x86/kernel/head64.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/head32.c +1 -1
@@ -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 */
arch/x86/kernel/head64.c +1 -1
@@ -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 */
PATCH RESEND 1/1 x86: Fix warning about cast from pointer to integer of different size
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.
---
Resending patch as I realized I forgot to add --auto to stgit command line and as such the Cc was ignored. Sorry for the extra noise on the list.
arch/x86/kernel/head32.c | 2 +- arch/x86/kernel/head64.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/head32.c +1 -1
@@ -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 */
arch/x86/kernel/head64.c +1 -1
@@ -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 */
Commit-ID: bbee3aec3472fc2ca10b6b1020aec84567ea25ce Gitweb: http://git.kernel.org/tip/bbee3aec3472fc2ca10b6b1020aec84567ea25ce Author: Alexander Duyck <[email protected]> AuthorDate: Mon, 19 Nov 2012 10:31:37 -0800 Committer: H. Peter Anvin <[email protected]> CommitDate: Mon, 19 Nov 2012 10:45:19 -0800
x86: Fix warning about cast from pointer to integer of different size
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.
--- arch/x86/kernel/head32.c | 2 +- arch/x86/kernel/head64.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/head32.c +1 -1
@@ -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 */
arch/x86/kernel/head64.c +1 -1
@@ -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 */