sched: Remove unnecessary variable from schedule_tail()
authorEdmundo Carmona Antoranz <eantoranz@gmail.com>
Sat, 6 Mar 2021 21:07:39 +0000 (15:07 -0600)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 10 Mar 2021 08:51:49 +0000 (09:51 +0100)
Since 565790d28b1 (sched: Fix balance_callback(), 2020-05-11), there
is no longer a need to reuse the result value of the call to finish_task_switch()
inside schedule_tail(), therefore the variable used to hold that value
(rq) is no longer needed.

Signed-off-by: Edmundo Carmona Antoranz <eantoranz@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210306210739.1370486-1-eantoranz@gmail.com
kernel/sched/core.c

index d2629fd2af0732ae5e328c45983d84bc546879f2..28c4df6dfd9704ed8a4f973fc4958e64a0fd7b71 100644 (file)
@@ -4253,8 +4253,6 @@ static struct rq *finish_task_switch(struct task_struct *prev)
 asmlinkage __visible void schedule_tail(struct task_struct *prev)
        __releases(rq->lock)
 {
-       struct rq *rq;
-
        /*
         * New tasks start with FORK_PREEMPT_COUNT, see there and
         * finish_task_switch() for details.
@@ -4264,7 +4262,7 @@ asmlinkage __visible void schedule_tail(struct task_struct *prev)
         * PREEMPT_COUNT kernels).
         */
 
-       rq = finish_task_switch(prev);
+       finish_task_switch(prev);
        preempt_enable();
 
        if (current->set_child_tid)