diff mbox

sched: Fix compile warning when using CONFIG_PREEMPT_NONE

Message ID 1467219311-19424-1-git-send-email-minyard@acm.org
State New
Headers show

Commit Message

Corey Minyard June 29, 2016, 4:55 p.m. UTC
From: Corey Minyard <cminyard@mvista.com>


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 <cminyard@mvista.com>

---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Corey Minyard July 29, 2016, 5:49 p.m. UTC | #1
On 07/29/2016 10:46 AM, Sebastian Andrzej Siewior wrote:
> * minyard@acm.org | 2016-06-29 11:55:11 [-0500]:

>

>> From: Corey Minyard <cminyard@mvista.com>

>>

>> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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