public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] trailing whitespace in kernel/ptrace.c
@ 2009-01-15 20:57 Roland McGrath
  2009-01-15 22:11 ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: Roland McGrath @ 2009-01-15 20:57 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds; +Cc: linux-kernel

These bug me every time I want to touch ptrace.c, nix them.

Signed-off-by: Roland McGrath <roland@redhat.com>
---
 kernel/ptrace.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index c9cf48b..8f61ad8 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -48,7 +48,7 @@ void __ptrace_link(struct task_struct *child, struct task_struct *new_parent)
 	list_add(&child->ptrace_entry, &new_parent->ptraced);
 	child->parent = new_parent;
 }
- 
+
 /*
  * Turn a tracing stop into a normal stop now, since with no tracer there
  * would be no way to wake it up with SIGCONT or SIGKILL.  If there was a
@@ -283,7 +283,7 @@ int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst
 		copied += retval;
 		src += retval;
 		dst += retval;
-		len -= retval;			
+		len -= retval;
 	}
 	return copied;
 }
@@ -308,7 +308,7 @@ int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long ds
 		copied += retval;
 		src += retval;
 		dst += retval;
-		len -= retval;			
+		len -= retval;
 	}
 	return copied;
 }

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] trailing whitespace in kernel/ptrace.c
  2009-01-15 20:57 [PATCH] trailing whitespace in kernel/ptrace.c Roland McGrath
@ 2009-01-15 22:11 ` Ingo Molnar
  2009-01-16 20:44   ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2009-01-15 22:11 UTC (permalink / raw)
  To: Roland McGrath; +Cc: Andrew Morton, Linus Torvalds, linux-kernel


* Roland McGrath <roland@redhat.com> wrote:

> These bug me every time I want to touch ptrace.c, nix them.
> 
> Signed-off-by: Roland McGrath <roland@redhat.com>
> ---
>  kernel/ptrace.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)

btw., here's the checkpatch output from that file:

------------------>

WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
#26: FILE: ptrace.c:26:
+#include <asm/uaccess.h>

ERROR: trailing whitespace
#51: FILE: ptrace.c:51:
+ $

WARNING: braces {} are not necessary for any arm of this statement
#63: FILE: ptrace.c:63:
+		if (child->signal->flags & SIGNAL_STOP_STOPPED) {
[...]
+		} else {
[...]

CHECK: memory barrier without comment
#157: FILE: ptrace.c:157:
+	smp_rmb();

ERROR: return is not a function, parentheses are not required
#172: FILE: ptrace.c:172:
+	return (!err ? true : false);

WARNING: line over 80 characters
#266: FILE: ptrace.c:266:
+int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len)

ERROR: trailing whitespace
#286: FILE: ptrace.c:286:
+^I^Ilen -= retval;^I^I^I$

WARNING: line over 80 characters
#291: FILE: ptrace.c:291:
+int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len)

ERROR: trailing whitespace
#311: FILE: ptrace.c:311:
+^I^Ilen -= retval;^I^I^I$

ERROR: else should follow close brace '}'
#425: FILE: ptrace.c:425:
+	}
+	else

WARNING: line over 80 characters
#455: FILE: ptrace.c:455:
+		ret = put_user(child->ptrace_message, (unsigned long __user *) data);

total: 5 errors, 6 warnings, 1 checks, 741 lines checked

kernel/ptrace.c has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] trailing whitespace in kernel/ptrace.c
  2009-01-15 22:11 ` Ingo Molnar
@ 2009-01-16 20:44   ` Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2009-01-16 20:44 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: roland, torvalds, linux-kernel

On Thu, 15 Jan 2009 23:11:35 +0100
Ingo Molnar <mingo@elte.hu> wrote:

> 
> * Roland McGrath <roland@redhat.com> wrote:
> 
> > These bug me every time I want to touch ptrace.c, nix them.
> > 
> > Signed-off-by: Roland McGrath <roland@redhat.com>
> > ---
> >  kernel/ptrace.c |    6 +++---
> >  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> btw., here's the checkpatch output from that file:

Yes, we might as well fix all of them while we're there.

> WARNING: line over 80 characters
> WARNING: line over 80 characters
> WARNING: line over 80 characters

but maybe not those.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-16 20:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-15 20:57 [PATCH] trailing whitespace in kernel/ptrace.c Roland McGrath
2009-01-15 22:11 ` Ingo Molnar
2009-01-16 20:44   ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox