aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/fault.c
diff options
context:
space:
mode:
authorVegard Nossum <vegard.nossum@gmail.com>2008-07-01 09:38:13 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-01 10:21:41 -0400
commitf294a8ce211bed7bfaca19bef21376a86200c421 (patch)
treef4400393a4f552989bc0560e9588c7457f1a6ae8 /arch/x86/mm/fault.c
parent9d8ad5d6c7fce31fd2c0fd4fe9977bda3e92e340 (diff)
x86: small unifications of address printing
'man 3 printf' tells me that %p should be printed as if by %#x, but this is not true for the kernel, which does not use the '0x' prefix for the %p conversion specifier. A small cast to (void *) is also prettier than #ifdef/#else/#endif. Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/fault.c')
-rw-r--r--arch/x86/mm/fault.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 8bcb6f40ccb6..0eb70d1dd1f9 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -396,11 +396,7 @@ static void show_fault_oops(struct pt_regs *regs, unsigned long error_code,
396 printk(KERN_CONT "NULL pointer dereference"); 396 printk(KERN_CONT "NULL pointer dereference");
397 else 397 else
398 printk(KERN_CONT "paging request"); 398 printk(KERN_CONT "paging request");
399#ifdef CONFIG_X86_32 399 printk(KERN_CONT " at %p\n", (void *) address);
400 printk(KERN_CONT " at %08lx\n", address);
401#else
402 printk(KERN_CONT " at %016lx\n", address);
403#endif
404 printk(KERN_ALERT "IP:"); 400 printk(KERN_ALERT "IP:");
405 printk_address(regs->ip, 1); 401 printk_address(regs->ip, 1);
406 dump_pagetable(address); 402 dump_pagetable(address);
@@ -800,14 +796,10 @@ bad_area_nosemaphore:
800 if (show_unhandled_signals && unhandled_signal(tsk, SIGSEGV) && 796 if (show_unhandled_signals && unhandled_signal(tsk, SIGSEGV) &&
801 printk_ratelimit()) { 797 printk_ratelimit()) {
802 printk( 798 printk(
803#ifdef CONFIG_X86_32 799 "%s%s[%d]: segfault at %lx ip %p sp %p error %lx",
804 "%s%s[%d]: segfault at %lx ip %08lx sp %08lx error %lx",
805#else
806 "%s%s[%d]: segfault at %lx ip %lx sp %lx error %lx",
807#endif
808 task_pid_nr(tsk) > 1 ? KERN_INFO : KERN_EMERG, 800 task_pid_nr(tsk) > 1 ? KERN_INFO : KERN_EMERG,
809 tsk->comm, task_pid_nr(tsk), address, regs->ip, 801 tsk->comm, task_pid_nr(tsk), address,
810 regs->sp, error_code); 802 (void *) regs->ip, (void *) regs->sp, error_code);
811 print_vma_addr(" in ", regs->ip); 803 print_vma_addr(" in ", regs->ip);
812 printk("\n"); 804 printk("\n");
813 } 805 }