]> err.no Git - linux-2.6/commitdiff
sched: fix warning in inc_rt_tasks() to not declare variable 'rq' if it's not needed
authorDavid Howells <dhowells@redhat.com>
Fri, 11 Jul 2008 12:34:54 +0000 (13:34 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 18 Jul 2008 11:56:03 +0000 (13:56 +0200)
Fix inc_rt_tasks() to not declare variable 'rq' if it's not needed.  It is
declared if CONFIG_SMP or CONFIG_RT_GROUP_SCHED, but only used if CONFIG_SMP.

This is a consequence of patch 1f11eb6a8bc92536d9e93ead48fa3ffbd1478571 plus
patch 1100ac91b6af02d8639d518fad5b434b1bf44ed6.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_rt.c

index 47ceac9e8552f309930c9f9af4d4131fd18ca8f3..147004c651c09dcb44f51cff5f86a67296e77aaa 100644 (file)
@@ -505,7 +505,9 @@ void inc_rt_tasks(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq)
        rt_rq->rt_nr_running++;
 #if defined CONFIG_SMP || defined CONFIG_RT_GROUP_SCHED
        if (rt_se_prio(rt_se) < rt_rq->highest_prio) {
+#ifdef CONFIG_SMP
                struct rq *rq = rq_of_rt_rq(rt_rq);
+#endif
 
                rt_rq->highest_prio = rt_se_prio(rt_se);
 #ifdef CONFIG_SMP