Skip to content

Commit 10c9e40

Browse files
paulmckrcuurezki
authored andcommitted
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 <[email protected]> Signed-off-by: Uladzislau Rezki (Sony) <[email protected]>
1 parent fc2897d commit 10c9e40

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/linux/rcupdate.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,15 +401,15 @@ static inline int debug_lockdep_rcu_enabled(void)
401401
} \
402402
} while (0)
403403

404-
#if defined(CONFIG_PROVE_RCU) && !defined(CONFIG_PREEMPT_RCU)
404+
#ifndef CONFIG_PREEMPT_RCU
405405
static inline void rcu_preempt_sleep_check(void)
406406
{
407407
RCU_LOCKDEP_WARN(lock_is_held(&rcu_lock_map),
408408
"Illegal context switch in RCU read-side critical section");
409409
}
410-
#else /* #ifdef CONFIG_PROVE_RCU */
410+
#else // #ifndef CONFIG_PREEMPT_RCU
411411
static inline void rcu_preempt_sleep_check(void) { }
412-
#endif /* #else #ifdef CONFIG_PROVE_RCU */
412+
#endif // #else // #ifndef CONFIG_PREEMPT_RCU
413413

414414
#define rcu_sleep_check() \
415415
do { \

0 commit comments

Comments
 (0)