Remove useless intermediate variable "fifo_nr_running".
Signed-off-by: Li zeming <[email protected]>
---
kernel/sched/core.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 3249c1272e57..1bab401920e8 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1176,8 +1176,6 @@ static void nohz_csd_func(void *info)
#ifdef CONFIG_NO_HZ_FULL
bool sched_can_stop_tick(struct rq *rq)
{
- int fifo_nr_running;
-
/* Deadline tasks, even if single, need the tick */
if (rq->dl.dl_nr_running)
return false;
@@ -1197,8 +1195,7 @@ bool sched_can_stop_tick(struct rq *rq)
* If there's no RR tasks, but FIFO tasks, we can skip the tick, no
* forced preemption between FIFO tasks.
*/
- fifo_nr_running = rq->rt.rt_nr_running - rq->rt.rr_nr_running;
- if (fifo_nr_running)
+ if (rq->rt.rt_nr_running - rq->rt.rr_nr_running)
return true;
/*
--
2.18.2