mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@mvista.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] sched: sched_rt.c unused struct rq warning fix
Date: Thu, 17 Jul 2008 13:37:39 -0700	[thread overview]
Message-ID: <1216327059-22706-1-git-send-email-dwalker@mvista.com> (raw)

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@elte.hu>
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@elte.hu>

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

Signed-off-by: Daniel Walker <dwalker@mvista.com>
---
 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)
 	rt_rq->rt_nr_running++;
 #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);
 #ifdef CONFIG_SMP
+		struct rq *rq = rq_of_rt_rq(rt_rq);
 		if (rq->online)
 			cpupri_set(&rq->rd->cpupri, rq->cpu,
 				   rt_se_prio(rt_se));
 #endif
+
+		rt_rq->highest_prio = rt_se_prio(rt_se);
 	}
 #endif
 #ifdef CONFIG_SMP
-- 
1.5.5.1.32.gba7d2


                 reply	other threads:[~2008-07-17 20:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1216327059-22706-1-git-send-email-dwalker@mvista.com \
    --to=dwalker@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®