Skip to content

Commit

Permalink
sched: fix warning in inc_rt_tasks() to not declare variable 'rq' if …
Browse files Browse the repository at this point in the history
…it's not needed

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 1f11eb6 plus
patch 1100ac9.

Signed-off-by: David Howells <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
dhowells authored and Ingo Molnar committed Jul 18, 2008
1 parent 13b40c1 commit 577b4a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/sched_rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 577b4a5

Please sign in to comment.