From: Paul E. McKenney Date: Mon, 15 Oct 2012 15:24:54 +0000 (-0700) Subject: rcu: Fix precedence error in cpu_needs_another_gp() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=340f588bbaed6cb518aa65e7a330dcc3fff911f8;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git rcu: Fix precedence error in cpu_needs_another_gp() The fix introduced by a10d206e (rcu: Fix day-one dyntick-idle stall-warning bug) has a C-language precedence error. It turns out that this error is harmless in that the same result is computed for all inputs, but the code is nevertheless a potential source of confusion. This commit therefore introduces parentheses in order to force the execution of the code to reflect the intent. Reported-by: Ben Hutchings Signed-off-by: Paul E. McKenney Signed-off-by: Paul E. McKenney --- diff --git a/kernel/rcutree.c b/kernel/rcutree.c index f9c17c39953..effd47a54b3 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c @@ -313,7 +313,7 @@ static int cpu_needs_another_gp(struct rcu_state *rsp, struct rcu_data *rdp) { return *rdp->nxttail[RCU_DONE_TAIL + - ACCESS_ONCE(rsp->completed) != rdp->completed] && + (ACCESS_ONCE(rsp->completed) != rdp->completed)] && !rcu_gp_in_progress(rsp); }