Skip to content

Commit a66dbda

Browse files
irengepaulmckrcu
authored andcommitted
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 <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 62ae195 commit a66dbda

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kernel/rcu/update.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,15 @@ module_param(rcu_normal_after_boot, int, 0);
9898
static bool rcu_read_lock_held_common(bool *ret)
9999
{
100100
if (!debug_lockdep_rcu_enabled()) {
101-
*ret = 1;
101+
*ret = true;
102102
return true;
103103
}
104104
if (!rcu_is_watching()) {
105-
*ret = 0;
105+
*ret = false;
106106
return true;
107107
}
108108
if (!rcu_lockdep_current_cpu_online()) {
109-
*ret = 0;
109+
*ret = false;
110110
return true;
111111
}
112112
return false;

0 commit comments

Comments
 (0)