linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sched/eevdf: using leftmost improves the readability of the code
@ 2024-01-15  4:46 Liu Song
  2024-01-15  7:41 ` Mike Galbraith
  0 siblings, 1 reply; 2+ messages in thread
From: Liu Song @ 2024-01-15  4:46 UTC (permalink / raw)
  To: mingo, peterz; +Cc: linux-kernel, liusong

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


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

end of thread, other threads:[~2024-01-15  7:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-15  4:46 [PATCH] sched/eevdf: using leftmost improves the readability of the code Liu Song
2024-01-15  7:41 ` Mike Galbraith

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