mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for John Stultz" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Todd Kjos <tkjos@google.com>, John Stultz <jstultz@google.com>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: sched/core] sched: deadline: Cleanup goto label in pick_earliest_pushable_dl_task
Date: Fri, 13 Dec 2024 12:05:58 -0000	[thread overview]
Message-ID: <173409155850.412.11730564987439132370.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20241206000009.1226085-1-jstultz@google.com>

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     7675361ff9a1d9038025c05267600d0c762c0236
Gitweb:        https://git.kernel.org/tip/7675361ff9a1d9038025c05267600d0c762c0236
Author:        John Stultz <jstultz@google.com>
AuthorDate:    Thu, 05 Dec 2024 15:59:35 -08:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Tue, 10 Dec 2024 15:07:06 +01:00

sched: deadline: Cleanup goto label in pick_earliest_pushable_dl_task

Commit 8b5e770ed7c0 ("sched/deadline: Optimize pull_dl_task()")
added a goto label seems would be better written as a while
loop.

So replace the goto with a while loop, to make it easier to read.

Reported-by: Todd Kjos <tkjos@google.com>
Signed-off-by: John Stultz <jstultz@google.com>
Reviewed-and-tested-by: K Prateek Nayak <kprateek.nayak@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Juri Lelli <juri.lelli@redhat.com>
Link: https://lore.kernel.org/r/20241206000009.1226085-1-jstultz@google.com
---
 kernel/sched/deadline.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 33b4646..643d101 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -2516,16 +2516,13 @@ 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) {
+	while (next_node) {
 		p = __node_2_pdl(next_node);
 
 		if (task_is_pushable(rq, p, cpu))
 			return p;
 
 		next_node = rb_next(next_node);
-		goto next_node;
 	}
 
 	return NULL;

      parent reply	other threads:[~2024-12-13 12:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-05 21:16 [RFC][PATCH] sched: deadline: Remove unnecessary " 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-bot2 for John Stultz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=173409155850.412.11730564987439132370.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=jstultz@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=tkjos@google.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®