diff options
author | Paul E. McKenney <paul.mckenney@linaro.org> | 2012-10-15 11:24:54 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2012-10-23 17:54:09 -0400 |
commit | 340f588bbaed6cb518aa65e7a330dcc3fff911f8 (patch) | |
tree | ae8973ce0bb0aa363f4a9707fb90b7445f381b2a /kernel/rcutree.c | |
parent | 3705b88db0d7cc4a097c32d9e554054103d3f807 (diff) |
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 <ben@decadent.org.uk>
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r-- | kernel/rcutree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index f9c17c399538..effd47a54b36 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -313,7 +313,7 @@ static int | |||
313 | cpu_needs_another_gp(struct rcu_state *rsp, struct rcu_data *rdp) | 313 | cpu_needs_another_gp(struct rcu_state *rsp, struct rcu_data *rdp) |
314 | { | 314 | { |
315 | return *rdp->nxttail[RCU_DONE_TAIL + | 315 | return *rdp->nxttail[RCU_DONE_TAIL + |
316 | ACCESS_ONCE(rsp->completed) != rdp->completed] && | 316 | (ACCESS_ONCE(rsp->completed) != rdp->completed)] && |
317 | !rcu_gp_in_progress(rsp); | 317 | !rcu_gp_in_progress(rsp); |
318 | } | 318 | } |
319 | 319 | ||