Skip to contentSkip to conversation

sched/fair: Remove unnecessary 'curr' reset for pick_next_entity()

PATCH New Chen Yu 1 participant 1 message Nov 11, 2023 Scheduler

lore
Share & tools
lore

Chen Yu

author
#0 lore raw

PATCH 1/1 sched/fair: Remove unnecessary 'curr' reset for pick_next_entity()

After commit 4c456c9ad334 ("sched/fair: Remove unused 'curr' argument from pick_next_entity()"), there is no need to reset 'curr' to NULL because it will not be used by pick_next_entity().

---
 kernel/sched/fair.c | 4 ----
 1 file changed, 4 deletions(-)
kernel/sched/fair.c +0 -4
index 2048138ce54b..ddea1be43710 100644
@@ -8198,8 +8198,6 @@ static struct task_struct *pick_task_fair(struct rq *rq)
 		if (curr) {
 			if (curr->on_rq)
 				update_curr(cfs_rq);
-			else
-				curr = NULL;
 
 			if (unlikely(check_cfs_rq_runtime(cfs_rq)))
 				goto again;
@@ -8249,8 +8247,6 @@ pick_next_task_fair(struct rq *rq, struct task_struct *prev, struct rq_flags *rf
 		if (curr) {
 			if (curr->on_rq)
 				update_curr(cfs_rq);
-			else
-				curr = NULL;
 
 			/*
 			 * This call to check_cfs_rq_runtime() will do the
Signature · 1 line
2.25.1