Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1323857 > unrolled thread
| Started by | Wei Tang <tangwei@cmss.chinamobile.com> |
|---|---|
| First post | 2016-02-02 08:50 +0100 |
| Last post | 2016-02-02 09:20 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] signal: use sizeof() instead of sizeof Wei Tang <tangwei@cmss.chinamobile.com> - 2016-02-02 08:50 +0100
Re: [PATCH] signal: use sizeof() instead of sizeof Richard Weinberger <richard@nod.at> - 2016-02-02 09:00 +0100
Re: 答复: [PATCH] signal: use sizeof() instead of sizeof Richard Weinberger <richard@nod.at> - 2016-02-02 09:20 +0100
| From | Wei Tang <tangwei@cmss.chinamobile.com> |
|---|---|
| Date | 2016-02-02 08:50 +0100 |
| Subject | [PATCH] signal: use sizeof() instead of sizeof |
| Message-ID | <qXDSO-7AO-17@gated-at.bofh.it> |
This patch fixes the checkpatch.pl warning to signal.c:
WARNING: sizeof info should be sizeof(info)
Signed-off-by: Wei Tang <tangwei@cmss.chinamobile.com>
---
kernel/signal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/signal.c b/kernel/signal.c
index f3f1f7a..13b267a 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1900,7 +1900,7 @@ static void ptrace_do_notify(int signr, int exit_code, int why)
{
siginfo_t info;
- memset(&info, 0, sizeof info);
+ memset(&info, 0, sizeof(info));
info.si_signo = signr;
info.si_code = exit_code;
info.si_pid = task_pid_vnr(current);
--
1.9.1
[toc] | [next] | [standalone]
| From | Richard Weinberger <richard@nod.at> |
|---|---|
| Date | 2016-02-02 09:00 +0100 |
| Message-ID | <qXE2u-7EE-5@gated-at.bofh.it> |
| In reply to | #1323857 |
Hi! Am 02.02.2016 um 08:35 schrieb Wei Tang: > This patch fixes the checkpatch.pl warning to signal.c: > > WARNING: sizeof info should be sizeof(info) And why is this patch needed? What problem does it fix? Complex expressions should be within parents but in this case it is IMHO perfectly fine. Thanks, //richard
[toc] | [prev] | [next] | [standalone]
| From | Richard Weinberger <richard@nod.at> |
|---|---|
| Date | 2016-02-02 09:20 +0100 |
| Subject | Re: 答复: [PATCH] signal: use sizeof() instead of sizeof |
| Message-ID | <qXElQ-84M-5@gated-at.bofh.it> |
| In reply to | #1323858 |
Am 02.02.2016 um 09:08 schrieb Wei Tang: > This is a simple patch, just to clear up the output from checkpatch.pl > script, otherwise, we will get WARNING always. This does not answer my question. What problem does it fix? How does your patch make the kernel better? Doing patches just because of checkpatch warnings (not errors) is IMHO not good. It is a script and not human, it does not understand all the corner cases. All it can do is giving us hints. But this does not mean that you have to blindly follow them. Thanks, //richard
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web