From: Mathieu Malaterre <malat@debian.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Mathieu Malaterre <malat@debian.org>,
Oleg Nesterov <oleg@redhat.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH] powerpc/ptrace: fix empty-body warning
Date: Tue, 18 Dec 2018 21:53:05 +0100 [thread overview]
Message-ID: <20181218205305.26647-1-malat@debian.org> (raw)
In commit a225f1567405 ("powerpc/ptrace: replace ptrace_report_syscall()
with a tracehook call") an empty body if(); was added.
Replace ; with {} to remove a warning (treated as error) reported by gcc
using W=1:
arch/powerpc/kernel/ptrace.c: In function ‘do_syscall_trace_enter’:
arch/powerpc/kernel/ptrace.c:3281:4: error: suggest braces around empty body in an ‘if’ statement [-Werror=empty-body]
Fixes: a225f1567405 ("powerpc/ptrace: replace ptrace_report_syscall() with a tracehook call")
Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
arch/powerpc/kernel/ptrace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 8314e8fed0ee..e1988892b3e7 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -3277,8 +3277,8 @@ long do_syscall_trace_enter(struct pt_regs *regs)
* avoid clobbering any register also, thus, not 'gotoing'
* skip label.
*/
- if (tracehook_report_syscall_entry(regs))
- ;
+ if (tracehook_report_syscall_entry(regs)) {
+ }
return -1;
}
--
2.19.2
next reply other threads:[~2018-12-18 20:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 20:53 Mathieu Malaterre [this message]
2018-12-19 0:22 ` [PATCH] powerpc/ptrace: fix empty-body warning Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181218205305.26647-1-malat@debian.org \
--to=malat@debian.org \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=oleg@redhat.com \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox