diff options
author | Roberto Nibali <ratz@drugphish.ch> | 2006-03-25 10:29:55 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 12:10:53 -0500 |
commit | 2b692a872c21849edb0a398937e31991526a9216 (patch) | |
tree | 492273495ff811755032de6f725859888998d27b /arch/x86_64/kernel/traps.c | |
parent | b2b978f98036717e2508cf3288aecb8f9c7d724e (diff) |
[PATCH] x86_64: Clean up white space in traps.c
Attached is a small code style cleanup patch that resulted from my
skimming through the arch/x86_64/kernel/traps.c code to figure out what
went haywire.
Signed-off-by: Roberto Nibali <ratz@drugphish.ch>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/traps.c')
-rw-r--r-- | arch/x86_64/kernel/traps.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index b25bc904d42..05dbbf40ccf 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -124,7 +124,7 @@ int printk_address(unsigned long address) | |||
124 | if (!modname) | 124 | if (!modname) |
125 | modname = delim = ""; | 125 | modname = delim = ""; |
126 | return printk("<%016lx>{%s%s%s%s%+ld}", | 126 | return printk("<%016lx>{%s%s%s%s%+ld}", |
127 | address,delim,modname,delim,symname,offset); | 127 | address, delim, modname, delim, symname, offset); |
128 | } | 128 | } |
129 | #else | 129 | #else |
130 | int printk_address(unsigned long address) | 130 | int printk_address(unsigned long address) |
@@ -336,13 +336,12 @@ void show_registers(struct pt_regs *regs) | |||
336 | show_stack(NULL, (unsigned long*)rsp); | 336 | show_stack(NULL, (unsigned long*)rsp); |
337 | 337 | ||
338 | printk("\nCode: "); | 338 | printk("\nCode: "); |
339 | if(regs->rip < PAGE_OFFSET) | 339 | if (regs->rip < PAGE_OFFSET) |
340 | goto bad; | 340 | goto bad; |
341 | 341 | ||
342 | for(i=0;i<20;i++) | 342 | for (i=0; i<20; i++) { |
343 | { | ||
344 | unsigned char c; | 343 | unsigned char c; |
345 | if(__get_user(c, &((unsigned char*)regs->rip)[i])) { | 344 | if (__get_user(c, &((unsigned char*)regs->rip)[i])) { |
346 | bad: | 345 | bad: |
347 | printk(" Bad RIP value."); | 346 | printk(" Bad RIP value."); |
348 | break; | 347 | break; |
@@ -481,7 +480,7 @@ static void __kprobes do_trap(int trapnr, int signr, char *str, | |||
481 | printk(KERN_INFO | 480 | printk(KERN_INFO |
482 | "%s[%d] trap %s rip:%lx rsp:%lx error:%lx\n", | 481 | "%s[%d] trap %s rip:%lx rsp:%lx error:%lx\n", |
483 | tsk->comm, tsk->pid, str, | 482 | tsk->comm, tsk->pid, str, |
484 | regs->rip,regs->rsp,error_code); | 483 | regs->rip, regs->rsp, error_code); |
485 | 484 | ||
486 | if (info) | 485 | if (info) |
487 | force_sig_info(signr, info, tsk); | 486 | force_sig_info(signr, info, tsk); |
@@ -495,9 +494,9 @@ static void __kprobes do_trap(int trapnr, int signr, char *str, | |||
495 | { | 494 | { |
496 | const struct exception_table_entry *fixup; | 495 | const struct exception_table_entry *fixup; |
497 | fixup = search_exception_tables(regs->rip); | 496 | fixup = search_exception_tables(regs->rip); |
498 | if (fixup) { | 497 | if (fixup) |
499 | regs->rip = fixup->fixup; | 498 | regs->rip = fixup->fixup; |
500 | } else | 499 | else |
501 | die(str, regs, error_code); | 500 | die(str, regs, error_code); |
502 | return; | 501 | return; |
503 | } | 502 | } |
@@ -570,7 +569,7 @@ asmlinkage void __kprobes do_general_protection(struct pt_regs * regs, | |||
570 | printk(KERN_INFO | 569 | printk(KERN_INFO |
571 | "%s[%d] general protection rip:%lx rsp:%lx error:%lx\n", | 570 | "%s[%d] general protection rip:%lx rsp:%lx error:%lx\n", |
572 | tsk->comm, tsk->pid, | 571 | tsk->comm, tsk->pid, |
573 | regs->rip,regs->rsp,error_code); | 572 | regs->rip, regs->rsp, error_code); |
574 | 573 | ||
575 | force_sig(SIGSEGV, tsk); | 574 | force_sig(SIGSEGV, tsk); |
576 | return; | 575 | return; |