mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched/fair: Remove unnecessary 'curr' reset for pick_next_entity()
@ 2023-11-11 15:43 Chen Yu
  0 siblings, 0 replies; only message in thread
From: Chen Yu @ 2023-11-11 15:43 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Vincent Guittot, Juri Lelli
  Cc: linux-kernel, Chen Yu

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().

Signed-off-by: Chen Yu <yu.c.chen@intel.com>
---
 kernel/sched/fair.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 2048138ce54b..ddea1be43710 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -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
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-11 15:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-11 15:43 [PATCH] sched/fair: Remove unnecessary 'curr' reset for pick_next_entity() Chen Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®