* [PATCH] x86/io_apic_32: fix printk format warning
@ 2008-10-11 23:41 Alexander Beregalov
2008-10-13 21:22 ` Hiroshi Shimamoto
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Beregalov @ 2008-10-11 23:41 UTC (permalink / raw)
To: h-shimamoto, mingo, linux-kernel
arch/x86/kernel/io_apic_32.c: In function 'print_local_APIC':
arch/x86/kernel/io_apic_32.c:1539: warning: format '%08x' expects type 'unsigned int', but argument 2 has type 'u64'
arch/x86/kernel/io_apic_32.c:1540: warning: format '%08x' expects type 'unsigned int', but argument 2 has type 'u64'
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
arch/x86/kernel/io_apic_32.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c
index e710289..f678d12 100644
--- a/arch/x86/kernel/io_apic_32.c
+++ b/arch/x86/kernel/io_apic_32.c
@@ -1536,8 +1536,8 @@ __apicdebuginit(void) print_local_APIC(void *dummy)
}
icr = apic_icr_read();
- printk(KERN_DEBUG "... APIC ICR: %08x\n", icr);
- printk(KERN_DEBUG "... APIC ICR2: %08x\n", icr >> 32);
+ printk(KERN_DEBUG "... APIC ICR: %08x\n", (unsigned int)icr);
+ printk(KERN_DEBUG "... APIC ICR2: %08x\n", (unsigned int)(icr >> 32));
v = apic_read(APIC_LVTT);
printk(KERN_DEBUG "... APIC LVTT: %08x\n", v);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86/io_apic_32: fix printk format warning
2008-10-11 23:41 [PATCH] x86/io_apic_32: fix printk format warning Alexander Beregalov
@ 2008-10-13 21:22 ` Hiroshi Shimamoto
0 siblings, 0 replies; 2+ messages in thread
From: Hiroshi Shimamoto @ 2008-10-13 21:22 UTC (permalink / raw)
To: Alexander Beregalov; +Cc: mingo, linux-kernel
Alexander Beregalov wrote:
> arch/x86/kernel/io_apic_32.c: In function 'print_local_APIC':
> arch/x86/kernel/io_apic_32.c:1539: warning: format '%08x' expects type 'unsigned int', but argument 2 has type 'u64'
> arch/x86/kernel/io_apic_32.c:1540: warning: format '%08x' expects type 'unsigned int', but argument 2 has type 'u64'
>
> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
> ---
>
> arch/x86/kernel/io_apic_32.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c
> index e710289..f678d12 100644
> --- a/arch/x86/kernel/io_apic_32.c
> +++ b/arch/x86/kernel/io_apic_32.c
> @@ -1536,8 +1536,8 @@ __apicdebuginit(void) print_local_APIC(void *dummy)
> }
>
> icr = apic_icr_read();
> - printk(KERN_DEBUG "... APIC ICR: %08x\n", icr);
> - printk(KERN_DEBUG "... APIC ICR2: %08x\n", icr >> 32);
> + printk(KERN_DEBUG "... APIC ICR: %08x\n", (unsigned int)icr);
> + printk(KERN_DEBUG "... APIC ICR2: %08x\n", (unsigned int)(icr >> 32));
looks good, but I think casting to u32 is better, because u32 is used in io_apic_64.c.
thanks,
Hiroshi Shimamoto
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-10-13 21:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-11 23:41 [PATCH] x86/io_apic_32: fix printk format warning Alexander Beregalov
2008-10-13 21:22 ` Hiroshi Shimamoto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox