Skip to contentSkip to conversation

arch/x86: Fix waring when build on x86_32

PATCH In review Jianjun Kong 2 participants 2 messages Oct 17, 2008 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch/x86: Fix waring when build on x86_32

Fix the waring When I buile the Linux-2.6 kernel on x86_32.
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'

---
 arch/x86/kernel/io_apic_32.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/io_apic_32.c +2 -2
index e710289..f678d12 100644
@@ -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);
Signature · 6 lines
1.5.2.5

-- 
Jianjun Kong | Happy Hacking
HomePage: http://kongove.cn
Gtalk: [email protected]
#1 lore raw
Quoted 16 lines · Jianjun Kong

Fix the waring When I buile the Linux-2.6 kernel on x86_32.
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'

---
arch/x86/kernel/io_apic_32.c | 4 ++--

1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/io_apic_32.c +0 -0
index e710289..f678d12 100644

arch/x86/kernel/io_apic_32.c __apicdebuginit(void) print_local_APIC(void *dummy) · line 1541

Quoted 8 lines
arch/x86/kernel/io_apic_32.c +2 -2
@@ -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));
 

http://lkml.org/lkml/2008/8/19/566
http://lkml.org/lkml/2008/8/20/119

Signature · 1 line
"Sometimes the only way to stay sane is to go a little crazy."