Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1626505 > unrolled thread

[PATCH v3 tip/core/rcu 09/11] rcu: Use bool value directly

Started by"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
First post2017-04-19 18:50 +0200
Last post2017-04-19 18:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v3 tip/core/rcu 09/11] rcu: Use bool value directly "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-19 18:50 +0200

#1626505 — [PATCH v3 tip/core/rcu 09/11] rcu: Use bool value directly

From"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Date2017-04-19 18:50 +0200
Subject[PATCH v3 tip/core/rcu 09/11] rcu: Use bool value directly
Message-ID<ty0XM-5M7-25@gated-at.bofh.it>
From: Nicholas Mc Guire <der.herr@hofr.at>

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index c4f195dd7c94..7c238604df18 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -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);
-- 
2.5.2

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web