Skip to content

Commit

Permalink
x86: Fix warning about cast from pointer to integer of different size
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Duyck authored and H. Peter Anvin committed Nov 19, 2012
1 parent afd51a0 commit bbee3ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/x86/kernel/head32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/head64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit bbee3ae

Please sign in to comment.