x86/io_apic_32: fix printk format warning
PATCH 1/1 x86/io_apic_32: fix printk format warning
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
@@ -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);
Quoted 15 lines · Alexander Beregalov
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 <[email protected]>---
arch/x86/kernel/io_apic_32.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)arch/x86/kernel/io_apic_32.c +0
-0
arch/x86/kernel/io_apic_32.c __apicdebuginit(void) print_local_APIC(void *dummy) · line 1540
Quoted 7 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 ));
looks good, but I think casting to u32 is better, because u32 is used in io_apic_64.c.
thanks,
Hiroshi Shimamoto