public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH] sched: deadline: Remove unnecessary goto label in pick_earliest_pushable_dl_task
@ 2024-12-05 21:16 John Stultz
  2024-12-05 21:23 ` Christophe JAILLET
  2024-12-05 23:59 ` [PATCH v2] sched: deadline: Cleanup " John Stultz
  0 siblings, 2 replies; 9+ messages in thread
From: John Stultz @ 2024-12-05 21:16 UTC (permalink / raw)
  To: LKML
  Cc: John Stultz, Ingo Molnar, Peter Zijlstra, Juri Lelli,
	Vincent Guittot, Dietmar Eggemann, Steven Rostedt, Ben Segall,
	Mel Gorman, Valentin Schneider, Wanpeng Li, Todd Kjos,
	kernel-team

Commit 8b5e770ed7c0 ("sched/deadline: Optimize pull_dl_task()")
added an odd goto label that seems to be unnecssary, given its
called unconditionally from the bottom of a while loop and the
label is at the top.

Thus, clean it up and remove the label/goto.

Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ben Segall <bsegall@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Valentin Schneider <vschneid@redhat.com>
Cc: Wanpeng Li <wanpeng.li@linux.intel.com>
Cc: Todd Kjos <tkjos@google.com>
Cc: kernel-team@android.com
Fixes: 8b5e770ed7c0 ("sched/deadline: Optimize pull_dl_task()")
Reported-by: Todd Kjos <tkjos@google.com>
Signed-off-by: John Stultz <jstultz@google.com>
---
 kernel/sched/deadline.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index d9d5a702f1a61..566a05efa4e57 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -2501,8 +2501,6 @@ static struct task_struct *pick_earliest_pushable_dl_task(struct rq *rq, int cpu
 		return NULL;
 
 	next_node = rb_first_cached(&rq->dl.pushable_dl_tasks_root);
-
-next_node:
 	if (next_node) {
 		p = __node_2_pdl(next_node);
 
@@ -2510,7 +2508,6 @@ static struct task_struct *pick_earliest_pushable_dl_task(struct rq *rq, int cpu
 			return p;
 
 		next_node = rb_next(next_node);
-		goto next_node;
 	}
 
 	return NULL;
-- 
2.47.0.338.g60cca15819-goog


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-12-13 12:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-05 21:16 [RFC][PATCH] sched: deadline: Remove unnecessary goto label in pick_earliest_pushable_dl_task John Stultz
2024-12-05 21:23 ` Christophe JAILLET
2024-12-05 21:23   ` Christophe JAILLET
2024-12-05 21:47   ` John Stultz
2024-12-05 23:59 ` [PATCH v2] sched: deadline: Cleanup " John Stultz
2024-12-06  8:14   ` K Prateek Nayak
2024-12-09 11:44   ` Juri Lelli
2024-12-09 12:01   ` Peter Zijlstra
2024-12-13 12:05   ` [tip: sched/core] " tip-bot2 for John Stultz

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