From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Date: Tue, 18 Nov 2014 07:44:22 +0000 Subject: [patch] exit: silence a bogus static checker warning Message-Id: <20141118074422.GA17829@mwanda> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Andrew Morton Cc: Oleg Nesterov , Michal Hocko , Ingo Molnar , Peter Zijlstra , Rik van Riel , Ionut Alexa , Peter Hurley , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Smatch complains about this: kernel/exit.c:543 forget_original_parent() warn: add some parenthesis here? I don't normally advocate changing the code to make the static checker happy but these are normally precedence bugs so I think it's ok to put parenthesis so it's clear the code is deliberate. Signed-off-by: Dan Carpenter diff --git a/kernel/exit.c b/kernel/exit.c index 6192422..1192d12 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -540,7 +540,7 @@ static void forget_original_parent(struct task_struct *father) list_for_each_entry(p, &father->children, sibling) { for_each_thread(p, t) { t->real_parent = reaper; - BUG_ON(!t->ptrace != (t->parent = father)); + BUG_ON((!t->ptrace) != (t->parent = father)); if (likely(!t->ptrace)) t->parent = t->real_parent; if (t->pdeath_signal)