aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu
diff options
context:
space:
mode:
authorJules Irenge <jbi.octave@gmail.com>2020-03-27 21:23:53 +0000
committerPaul E. McKenney <paulmck@kernel.org>2020-04-27 11:01:16 -0700
commita66dbda7893f48b97d7406ae42fa29190aa672a0 (patch)
treef3694f6a03c1d2b98729c9d6fcc7911ae875a92a /kernel/rcu
parentrcu: Mark rcu_state.gp_seq to detect more concurrent writes (diff)
downloadlinux-dev-a66dbda7893f48b97d7406ae42fa29190aa672a0.tar.xz
linux-dev-a66dbda7893f48b97d7406ae42fa29190aa672a0.zip
rcu: Replace assigned pointer ret value by corresponding boolean value
Coccinelle reports warnings at rcu_read_lock_held_common() WARNING: Assignment of 0/1 to bool variable To fix this, the assigned pointer ret values are replaced by corresponding boolean value. Given that ret is a pointer of bool type Signed-off-by: Jules Irenge <jbi.octave@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu')
-rw-r--r--kernel/rcu/update.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
index 72461dd80d29..17f23569e21a 100644
--- a/kernel/rcu/update.c
+++ b/kernel/rcu/update.c
@@ -98,15 +98,15 @@ module_param(rcu_normal_after_boot, int, 0);
static bool rcu_read_lock_held_common(bool *ret)
{
if (!debug_lockdep_rcu_enabled()) {
- *ret = 1;
+ *ret = true;
return true;
}
if (!rcu_is_watching()) {
- *ret = 0;
+ *ret = false;
return true;
}
if (!rcu_lockdep_current_cpu_online()) {
- *ret = 0;
+ *ret = false;
return true;
}
return false;