mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kernel/ptrace.c: 2 blank lines, 2 sizeof parentheses
@ 2015-06-29  3:34 Ruben Carlo Benante
  0 siblings, 0 replies; only message in thread
From: Ruben Carlo Benante @ 2015-06-29  3:34 UTC (permalink / raw)
  To: roland; +Cc: oleg, linux-kernel, Ruben Carlo Benante

Fixed 4 checkpatch.pl warnings:
 kernel/ptrace.c:270:  WARNING: Missing a blank line after declarations
 kernel/ptrace.c:413:  WARNING: Missing a blank line after declarations
 kernel/ptrace.c:841:  WARNING: sizeof siginfo should be sizeof(siginfo)
 kernel/ptrace.c:1140: WARNING: sizeof siginfo should be sizeof(siginfo)

Signed-off-by: Ruben Carlo Benante <rcb@beco.cc>
---
 kernel/ptrace.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index c8e0e05..0759a65 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -264,6 +264,7 @@ ok:
 bool ptrace_may_access(struct task_struct *task, unsigned int mode)
 {
 	int err;
+
 	task_lock(task);
 	err = __ptrace_may_access(task, mode);
 	task_unlock(task);
@@ -407,6 +408,7 @@ static int ptrace_traceme(void)
 static int ignoring_children(struct sighand_struct *sigh)
 {
 	int ret;
+
 	spin_lock(&sigh->siglock);
 	ret = (sigh->action[SIGCHLD-1].sa.sa_handler == SIG_IGN) ||
 	      (sigh->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDWAIT);
@@ -835,7 +837,7 @@ int ptrace_request(struct task_struct *child, long request,
 		break;
 
 	case PTRACE_SETSIGINFO:
-		if (copy_from_user(&siginfo, datavp, sizeof siginfo))
+		if (copy_from_user(&siginfo, datavp, sizeof(siginfo)))
 			ret = -EFAULT;
 		else
 			ret = ptrace_setsiginfo(child, &siginfo);
@@ -1134,7 +1136,7 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
 		break;
 
 	case PTRACE_SETSIGINFO:
-		memset(&siginfo, 0, sizeof siginfo);
+		memset(&siginfo, 0, sizeof(siginfo));
 		if (copy_siginfo_from_user32(
 			    &siginfo, (struct compat_siginfo __user *) datap))
 			ret = -EFAULT;
-- 
2.1.4


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-06-29  3:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-29  3:34 [PATCH] kernel/ptrace.c: 2 blank lines, 2 sizeof parentheses Ruben Carlo Benante

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

all inboxes | Powered by JetHome®