sched: core: Simplify sched_can_stop_tick()
Commit Message
Remove useless intermediate variable "fifo_nr_running".
Signed-off-by: Li zeming <zeming@nfschina.com>
---
kernel/sched/core.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
@@ -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;
/*