rcu: Use bool value directly
authorNicholas Mc Guire <der.herr@hofr.at>
Sat, 25 Mar 2017 19:46:01 +0000 (20:46 +0100)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 19 Apr 2017 16:29:19 +0000 (09:29 -0700)
The beenonline variable is declared bool so there is no need for an
explicit comparison, especially not against the constant zero.

Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/tree.c

index c4f195dd7c94994a4e9a5bbc3b28857fc2028829..7c238604df189366402bc8e2282646fa3c0f1848 100644 (file)
@@ -3085,7 +3085,7 @@ __rcu_process_callbacks(struct rcu_state *rsp)
        bool needwake;
        struct rcu_data *rdp = raw_cpu_ptr(rsp->rda);
 
-       WARN_ON_ONCE(rdp->beenonline == 0);
+       WARN_ON_ONCE(!rdp->beenonline);
 
        /* Update RCU state based on any recent quiescent states. */
        rcu_check_quiescent_state(rsp, rdp);