Skip to contentSkip to conversation

sched: Fix compile warning when using CONFIG_PREEMPT_NONE

PATCH In review [email protected] 3 participants 3 messages Jun 29, 2016 – Jul 29, 2016 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched: Fix compile warning when using CONFIG_PREEMPT_NONE

From: Corey Minyard <[email protected]>

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

---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/core.c +1 -1
index f3130a8..57af106 100644
@@ -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
Signature · 1 line
2.7.4
#1 lore raw
Quoted 4 lines · * [email protected] | 2016-06-29 11:55:11 [-0500]:

From: Corey Minyard <[email protected]>

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

Oh sorry, I missed that one but the problem is gone, right?

Sebastian

#2 lore raw
Quoted 9 lines · Sebastian Andrzej Siewior
Quoted 4 lines · * [email protected] | 2016-06-29 11:55:11 [-0500]:

From: Corey Minyard <[email protected]>

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

Oh sorry, I missed that one but the problem is gone, right?

Sebastian

Yes, it appears to be gone. Before I think you could define CONFIG_PREEMPT_LAZY without CONFIG_PREEMPT being defined.

-corey