sched: Fix compile warning when using CONFIG_PREEMPT_NONE
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
@@ -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
Quoted 4 lines · * [email protected] | 2016-06-29 11:55:11 [-0500]:
From: Corey Minyard <[email protected]>
preemptible_lazy()is only used underCONFIG_PREEMPT, but it was always defined. Move it into aCONFIG_PREEMPTifdef.
Oh sorry, I missed that one but the problem is gone, right?
Sebastian
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 underCONFIG_PREEMPT, but it was always defined. Move it into aCONFIG_PREEMPTifdef.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