From nobody Thu Dec 25 16:09:51 2025 Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 462AD17CF for ; Mon, 15 Jan 2024 05:02:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=liusong@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0W-ZivNm_1705293980; Received: from localhost(mailfrom:liusong@linux.alibaba.com fp:SMTPD_---0W-ZivNm_1705293980) by smtp.aliyun-inc.com; Mon, 15 Jan 2024 12:46:50 +0800 From: Liu Song 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 Message-Id: <20240115044619.34718-1-liusong@linux.alibaba.com> X-Mailer: git-send-email 2.19.1.6.gb485710b Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Using 'leftmost' enhances code readability, without involving any logical changes. Signed-off-by: Liu Song --- 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) =20 struct sched_entity *__pick_first_entity(struct cfs_rq *cfs_rq) { - struct rb_node *left =3D rb_first_cached(&cfs_rq->tasks_timeline); + struct rb_node *leftmost =3D rb_first_cached(&cfs_rq->tasks_timeline); =20 - if (!left) + if (!leftmost) return NULL; =20 - return __node_2_se(left); + return __node_2_se(leftmost); } =20 /* --=20 2.19.1.6.gb485710b