Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[PATCH] Fix an incompatible pointer type warning on x86_64 compilations

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


dhowells at redhat

Jun 7, 2008, 9:18 AM

Post #1 of 3 (120 views)
Permalink
[PATCH] 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.

Signed-off-by: David Howells <dhowells[at]redhat.com>
---

arch/x86/mm/init_64.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 156e6d7..998a06e 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -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);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo[at]vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


mingo at elte

Jun 10, 2008, 3:37 AM

Post #2 of 3 (90 views)
Permalink
Re: [PATCH] Fix an incompatible pointer type warning on x86_64 compilations [In reply to]

* David Howells <dhowells[at]redhat.com> wrote:

> 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.

applied to tip/x86/urgent, thanks David.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo[at]vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


kjwinchester at gmail

Jun 10, 2008, 5:20 AM

Post #3 of 3 (83 views)
Permalink
Re: [PATCH] Fix an incompatible pointer type warning on x86_64 compilations [In reply to]

On Sat, Jun 7, 2008 at 1:18 PM, David Howells <dhowells[at]redhat.com> wrote:
> 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.
>
> Signed-off-by: David Howells <dhowells[at]redhat.com>
> ---
>
> arch/x86/mm/init_64.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
>
> diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
> index 156e6d7..998a06e 100644
> --- a/arch/x86/mm/init_64.c
> +++ b/arch/x86/mm/init_64.c
> @@ -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);
>

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.

--
Kevin Winchester
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo[at]vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.