Thread (3 messages) 3 messages, 3 authors, 2016-07-29
STALE3642d

[PATCH] sched: Fix compile warning when using CONFIG_PREEMPT_NONE

From: <hidden>
Date: 2016-06-29 16:56:45
Subsystem: scheduler, the rest · Maintainers: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot, Linus Torvalds

From: Corey Minyard <redacted>

preemptible_lazy() is only used under CONFIG_PREEMPT, but it was
always defined.  Move it into a CONFIG_PREEMPT ifdef.

Signed-off-by: Corey Minyard <redacted>
---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index f3130a8..57af106 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3454,6 +3454,7 @@ static void __sched notrace preempt_schedule_common(void)
 	} while (need_resched());
 }
 
+#ifdef CONFIG_PREEMPT
 #ifdef CONFIG_PREEMPT_LAZY
 /*
  * If TIF_NEED_RESCHED is then we allow to be scheduled away since this is
@@ -3478,7 +3479,6 @@ static int preemptible_lazy(void)
 
 #endif
 
-#ifdef CONFIG_PREEMPT
 /*
  * this is the entry point to schedule() from in-kernel preemption
  * off of preempt_enable. Kernel preemptions off return from interrupt
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help