diff options
| author | Roland McGrath <roland@redhat.com> | 2009-04-08 02:21:06 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-08 13:21:44 -0400 |
| commit | 3a709703538c471530405556dda136fd0d82b0dc (patch) | |
| tree | 0479d66b10b6d77bacc269471285bd2be344ccb9 | |
| parent | 4c967291fc875a53de7126d256ad5e48f42a6521 (diff) | |
ptrace: some checkpatch fixes
This fixes all the checkpatch --file complaints about kernel/ptrace.c
and also removes an unused #include. I've verified that there are no
changes to the compiled code on x86_64.
Signed-off-by: Roland McGrath <roland@redhat.com>
[ Removed the parts that just split a line - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| -rw-r--r-- | kernel/ptrace.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index aaad0ec34194..64191fa09b7e 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c | |||
| @@ -21,9 +21,7 @@ | |||
| 21 | #include <linux/audit.h> | 21 | #include <linux/audit.h> |
| 22 | #include <linux/pid_namespace.h> | 22 | #include <linux/pid_namespace.h> |
| 23 | #include <linux/syscalls.h> | 23 | #include <linux/syscalls.h> |
| 24 | 24 | #include <linux/uaccess.h> | |
| 25 | #include <asm/pgtable.h> | ||
| 26 | #include <asm/uaccess.h> | ||
| 27 | 25 | ||
| 28 | 26 | ||
| 29 | /* | 27 | /* |
| @@ -48,7 +46,7 @@ void __ptrace_link(struct task_struct *child, struct task_struct *new_parent) | |||
| 48 | list_add(&child->ptrace_entry, &new_parent->ptraced); | 46 | list_add(&child->ptrace_entry, &new_parent->ptraced); |
| 49 | child->parent = new_parent; | 47 | child->parent = new_parent; |
| 50 | } | 48 | } |
| 51 | 49 | ||
| 52 | /* | 50 | /* |
| 53 | * Turn a tracing stop into a normal stop now, since with no tracer there | 51 | * Turn a tracing stop into a normal stop now, since with no tracer there |
| 54 | * would be no way to wake it up with SIGCONT or SIGKILL. If there was a | 52 | * would be no way to wake it up with SIGCONT or SIGKILL. If there was a |
| @@ -173,7 +171,7 @@ bool ptrace_may_access(struct task_struct *task, unsigned int mode) | |||
| 173 | task_lock(task); | 171 | task_lock(task); |
| 174 | err = __ptrace_may_access(task, mode); | 172 | err = __ptrace_may_access(task, mode); |
| 175 | task_unlock(task); | 173 | task_unlock(task); |
| 176 | return (!err ? true : false); | 174 | return !err; |
| 177 | } | 175 | } |
| 178 | 176 | ||
| 179 | int ptrace_attach(struct task_struct *task) | 177 | int ptrace_attach(struct task_struct *task) |
| @@ -358,7 +356,7 @@ int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst | |||
| 358 | copied += retval; | 356 | copied += retval; |
| 359 | src += retval; | 357 | src += retval; |
| 360 | dst += retval; | 358 | dst += retval; |
| 361 | len -= retval; | 359 | len -= retval; |
| 362 | } | 360 | } |
| 363 | return copied; | 361 | return copied; |
| 364 | } | 362 | } |
| @@ -383,7 +381,7 @@ int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long ds | |||
| 383 | copied += retval; | 381 | copied += retval; |
| 384 | src += retval; | 382 | src += retval; |
| 385 | dst += retval; | 383 | dst += retval; |
| 386 | len -= retval; | 384 | len -= retval; |
| 387 | } | 385 | } |
| 388 | return copied; | 386 | return copied; |
| 389 | } | 387 | } |
| @@ -496,9 +494,9 @@ static int ptrace_resume(struct task_struct *child, long request, long data) | |||
| 496 | if (unlikely(!arch_has_single_step())) | 494 | if (unlikely(!arch_has_single_step())) |
| 497 | return -EIO; | 495 | return -EIO; |
| 498 | user_enable_single_step(child); | 496 | user_enable_single_step(child); |
| 499 | } | 497 | } else { |
| 500 | else | ||
| 501 | user_disable_single_step(child); | 498 | user_disable_single_step(child); |
| 499 | } | ||
| 502 | 500 | ||
| 503 | child->exit_code = data; | 501 | child->exit_code = data; |
| 504 | wake_up_process(child); | 502 | wake_up_process(child); |
