mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-01 22:18:04 +07:00
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>
This commit is contained in:
parent
62ae19511f
commit
a66dbda789
@ -98,15 +98,15 @@ module_param(rcu_normal_after_boot, int, 0);
|
|||||||
static bool rcu_read_lock_held_common(bool *ret)
|
static bool rcu_read_lock_held_common(bool *ret)
|
||||||
{
|
{
|
||||||
if (!debug_lockdep_rcu_enabled()) {
|
if (!debug_lockdep_rcu_enabled()) {
|
||||||
*ret = 1;
|
*ret = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!rcu_is_watching()) {
|
if (!rcu_is_watching()) {
|
||||||
*ret = 0;
|
*ret = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!rcu_lockdep_current_cpu_online()) {
|
if (!rcu_lockdep_current_cpu_online()) {
|
||||||
*ret = 0;
|
*ret = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user