Fix an incompatible pointer type warning on x86_64 compilations
PATCH 1/1 Fix an incompatible pointer type warning on x86_64 compilations
Fix an incompatible pointer type warning on x86_64 compilations. early_memtest() is passing a u64* to find_e820_area_size() which is expecting an unsigned long. Change t_start and t_size to unsigned long as those are also 64-bit types on x88_64.
---
arch/x86/mm/init_64.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/mm/init_64.c +2 -2
@@ -506,7 +506,7 @@ early_param("memtest", parse_memtest);static void __init early_memtest (unsigned long start,unsigned long end) { -u64 t_start, t_size; +unsigned long t_start, t_size;unsigned pattern;if (!memtest_pattern)
@@ -525,7 +525,7 @@ static void __init early_memtest(unsigned long start, unsigned long end)if (t_start + t_size > end) t_size = end - t_start; -printk (KERN_CONT "\n %016llx - %016llx pattern %d" , +printk (KERN_CONT "\n %016lx - %016lx pattern %d" , t_start, t_start + t_size, pattern);memtest (t_start, t_size, pattern);
Ingo Molnar
AppliedQuoted 4 lines · David Howells
Fix an incompatible pointer type warning on
x86_64compilations.early_memtest()is passing a u64* tofind_e820_area_size()which is expecting an unsigned long. Changet_startandt_sizeto unsigned long as those are also 64-bit types onx88_64.
applied to tip/x86/urgent, thanks David.
Ingo
Quoted 27 lines · David Howells
Fix an incompatible pointer type warning on
x86_64compilations.early_memtest()is passing a u64* tofind_e820_area_size()which is expecting an unsigned long. Changet_startandt_sizeto unsigned long as those are also 64-bit types onx88_64.Signed-off-by David Howells <[email protected]>---
arch/x86/mm/init_64.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)arch/x86/mm/init_64.c +1
-1@@ -506,7 +506,7 @@ early_param("memtest", parse_memtest);static void __init early_memtest (unsigned long start,unsigned long end) { -u64 t_start, t_size; +unsigned long t_start, t_size;unsigned pattern;if (!memtest_pattern)
arch/x86/mm/init_64.c static void __init early_memtest(unsigned long start, unsigned long end) · line 531
Quoted 8 lines
arch/x86/mm/init_64.c +1
-1@@ -525,7 +525,7 @@ static void __init early_memtest(unsigned long start, unsigned long end)if (t_start + t_size > end) t_size = end - t_start; -printk (KERN_CONT "\n %016llx - %016llx pattern %d" , +printk (KERN_CONT "\n %016lx - %016lx pattern %d" , t_start, t_start + t_size, pattern);memtest (t_start, t_size, pattern);
This is essentially a revert of a patch I sent to Ingo for a warning I saw in linux-next. Has find_e820_area_size() changed in linux-next to take u64 instead of unsigned long? In any case, the patch should not have been submitted to Linus, since it was only in next that I saw the warning. Sorry for the confusion.
Signature · 1 line
Kevin Winchester