From: Liu Song <liusong@linux.alibaba.com>
To: mingo@redhat.com, peterz@infradead.org
Cc: linux-kernel@vger.kernel.org, liusong@linux.alibaba.com
Subject: [PATCH] sched/eevdf: using leftmost improves the readability of the code
Date: Mon, 15 Jan 2024 12:46:19 +0800 [thread overview]
Message-ID: <20240115044619.34718-1-liusong@linux.alibaba.com> (raw)
Using 'leftmost' enhances code readability, without involving any logical
changes.
Signed-off-by: Liu Song <liusong@linux.alibaba.com>
---
kernel/sched/fair.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index f2bb83675e4a..4247584258ae 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -848,12 +848,12 @@ struct sched_entity *__pick_root_entity(struct cfs_rq *cfs_rq)
struct sched_entity *__pick_first_entity(struct cfs_rq *cfs_rq)
{
- struct rb_node *left = rb_first_cached(&cfs_rq->tasks_timeline);
+ struct rb_node *leftmost = rb_first_cached(&cfs_rq->tasks_timeline);
- if (!left)
+ if (!leftmost)
return NULL;
- return __node_2_se(left);
+ return __node_2_se(leftmost);
}
/*
--
2.19.1.6.gb485710b
next reply other threads:[~2024-01-15 5:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-15 4:46 Liu Song [this message]
2024-01-15 7:41 ` [PATCH] sched/eevdf: using leftmost improves the readability of the code Mike Galbraith
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=20240115044619.34718-1-liusong@linux.alibaba.com \
--to=liusong@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).