diff options
author | 2024-03-15 23:29:59 -0700 | |
---|---|---|
committer | 2024-04-15 18:12:20 +0200 | |
commit | 10c9e40f297d3f1b0d4df6e73618d4466a0b2cfc (patch) | |
tree | edb10b36416f05233c0e0700d05b0b48513deb7d | |
parent | rcu: Inform KCSAN of one-byte cmpxchg() in rcu_trc_cmpxchg_need_qs() (diff) | |
download | wireguard-linux-10c9e40f297d3f1b0d4df6e73618d4466a0b2cfc.tar.xz wireguard-linux-10c9e40f297d3f1b0d4df6e73618d4466a0b2cfc.zip |
rcu: Remove redundant CONFIG_PROVE_RCU #if condition
The #if condition controlling the rcu_preempt_sleep_check() definition
has a redundant check for CONFIG_PREEMPT_RCU, which is already checked
for by an enclosing #ifndef. This commit therefore removes this redundant
condition from the inner #if.
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
-rw-r--r-- | include/linux/rcupdate.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 2c54750e36a0..382780bb60f4 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -401,15 +401,15 @@ static inline int debug_lockdep_rcu_enabled(void) } \ } while (0) -#if defined(CONFIG_PROVE_RCU) && !defined(CONFIG_PREEMPT_RCU) +#ifndef CONFIG_PREEMPT_RCU static inline void rcu_preempt_sleep_check(void) { RCU_LOCKDEP_WARN(lock_is_held(&rcu_lock_map), "Illegal context switch in RCU read-side critical section"); } -#else /* #ifdef CONFIG_PROVE_RCU */ +#else // #ifndef CONFIG_PREEMPT_RCU static inline void rcu_preempt_sleep_check(void) { } -#endif /* #else #ifdef CONFIG_PROVE_RCU */ +#endif // #else // #ifndef CONFIG_PREEMPT_RCU #define rcu_sleep_check() \ do { \ |