mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 08:31:55 +00:00
sched: Remove redundant assignment to "rt_rq" in update_curr_rt(...)
Variable "rt_rq" is used only in block "for_each_sched_rt_entity" so the value assigned to it at the beginning of the update_curr_rt(...) gets overwritten without ever being read. Remove redundant assignment and move variable declaration to the block in which it is being used. Signed-off-by: Giedrius Rekasius <giedrius.rekasius@gmail.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: kernel-janitors@vger.kernel.org Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/1401027811-30066-1-git-send-email-giedrius.rekasius@gmail.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
5d4dfddd4f
commit
0b07939cbf
@ -924,7 +924,6 @@ static void update_curr_rt(struct rq *rq)
|
|||||||
{
|
{
|
||||||
struct task_struct *curr = rq->curr;
|
struct task_struct *curr = rq->curr;
|
||||||
struct sched_rt_entity *rt_se = &curr->rt;
|
struct sched_rt_entity *rt_se = &curr->rt;
|
||||||
struct rt_rq *rt_rq = rt_rq_of_se(rt_se);
|
|
||||||
u64 delta_exec;
|
u64 delta_exec;
|
||||||
|
|
||||||
if (curr->sched_class != &rt_sched_class)
|
if (curr->sched_class != &rt_sched_class)
|
||||||
@ -949,7 +948,7 @@ static void update_curr_rt(struct rq *rq)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
for_each_sched_rt_entity(rt_se) {
|
for_each_sched_rt_entity(rt_se) {
|
||||||
rt_rq = rt_rq_of_se(rt_se);
|
struct rt_rq *rt_rq = rt_rq_of_se(rt_se);
|
||||||
|
|
||||||
if (sched_rt_runtime(rt_rq) != RUNTIME_INF) {
|
if (sched_rt_runtime(rt_rq) != RUNTIME_INF) {
|
||||||
raw_spin_lock(&rt_rq->rt_runtime_lock);
|
raw_spin_lock(&rt_rq->rt_runtime_lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user