Skip to contentSkip to conversation

sched: remove unneeded #if directive

PATCH New Hiroshi Shimamoto 1 participant 1 message Oct 18, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched: remove unneeded #if directive

From: Hiroshi Shimamoto <[email protected]>

__cond_resched_spinlock() is in #ifdef CONFIG_PREEMPT_RT.
So the following line always true.
#if (defined(CONFIG_SMP) && defined(CONFIG_PREEMPT)) || defined(CONFIG_PREEMPT_RT)

---
 kernel/sched.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
kernel/sched.c +1 -2
index 0d68e79..2b34f00 100644
@@ -5841,7 +5841,6 @@ EXPORT_SYMBOL(__cond_resched_raw_spinlock);
 
 int __cond_resched_spinlock(spinlock_t *lock)
 {
-#if (defined(CONFIG_SMP) && defined(CONFIG_PREEMPT)) || defined(CONFIG_PREEMPT_RT)
 	if (lock->break_lock) {
 		lock->break_lock = 0;
 		spin_unlock_no_resched(lock);
@@ -5849,7 +5848,7 @@ int __cond_resched_spinlock(spinlock_t *lock)
 		spin_lock(lock);
 		return 1;
 	}
-#endif
+
 	return 0;
 }
 EXPORT_SYMBOL(__cond_resched_spinlock);
Signature · 1 line
1.5.6