[PATCH] sched: sched_rt.c unused struct rq warning fix

From: Daniel Walker
Date: Thu Jul 17 2008 - 16:38:01 EST

following warning,

In file included from /localuser/dwalker/linus/kernel/sched.c:1675:
/localuser/dwalker/linus/kernel/sched_rt.c: In function âinc_rt_tasksâ:
/localuser/dwalker/linus/kernel/sched_rt.c:508: warning: unused variable ârqâ

looks to be caused by,

commit 1100ac91b6af02d8639d518fad5b434b1bf44ed6
Author: Ingo Molnar <mingo@xxxxxxx>
Date: Thu Jun 5 12:25:37 2008 +0200

sched: fix cpuprio build bug

this patch was not built on !SMP:

kernel/sched_rt.c: In function 'inc_rt_tasks':
kernel/sched_rt.c:404: error: 'struct rq' has no member named 'online'

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>

Only in the case that group scheduling is on, but SMP is off..

Signed-off-by: Daniel Walker <dwalker@xxxxxxxxxx>
kernel/sched_rt.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index 47ceac9..7280277 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -505,14 +505,14 @@ void inc_rt_tasks(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq)
#if defined CONFIG_SMP || defined CONFIG_RT_GROUP_SCHED
if (rt_se_prio(rt_se) < rt_rq->highest_prio) {
- struct rq *rq = rq_of_rt_rq(rt_rq);
- rt_rq->highest_prio = rt_se_prio(rt_se);
+ struct rq *rq = rq_of_rt_rq(rt_rq);
if (rq->online)
cpupri_set(&rq->rd->cpupri, rq->cpu,
+ rt_rq->highest_prio = rt_se_prio(rt_se);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/