mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched/core: Combine separate 'else' and 'if' statements
@ 2026-06-08  7:18 luoliang
  2026-06-08  8:08 ` Peter Zijlstra
  2026-06-09  8:32 ` [tip: sched/core] " tip-bot2 for Liang Luo
  0 siblings, 2 replies; 5+ messages in thread
From: luoliang @ 2026-06-08  7:18 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra
  Cc: Juri Lelli, Vincent Guittot, Dietmar Eggemann, Steven Rostedt,
	Ben Segall, Mel Gorman, Valentin Schneider, K Prateek Nayak,
	linux-kernel, Liang Luo

From: Liang Luo <luoliang@kylinos.cn>

The kernel coding style recommends using 'else if' instead of
placing 'if' on a separate line after 'else'. This change makes
the code consistent with the rest of the kernel codebase.

Signed-off-by: Liang Luo <luoliang@kylinos.cn>
---
 kernel/sched/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index da20fb6ea25a..c2bf0fc6ac97 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3716,8 +3716,7 @@ ttwu_do_activate(struct rq *rq, struct task_struct *p, int wake_flags,
 		en_flags |= ENQUEUE_RQ_SELECTED;
 	if (wake_flags & WF_MIGRATED)
 		en_flags |= ENQUEUE_MIGRATED;
-	else
-	if (p->in_iowait) {
+	else if (p->in_iowait) {
 		delayacct_blkio_end(p);
 		atomic_dec(&task_rq(p)->nr_iowait);
 	}
--
2.45.0

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH] sched/core: Combine separate 'else' and 'if' statements
@ 2026-05-13  8:54 luoliang
  2026-05-15 16:24 ` Valentin Schneider
  0 siblings, 1 reply; 5+ messages in thread
From: luoliang @ 2026-05-13  8:54 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra
  Cc: Juri Lelli, Vincent Guittot, Dietmar Eggemann, Steven Rostedt,
	Ben Segall, Mel Gorman, Valentin Schneider, K Prateek Nayak,
	linux-kernel, Liang Luo

From: Liang Luo <luoliang@kylinos.cn>

The kernel coding style recommends using 'else if' instead of
placing 'if' on a separate line after 'else'. This change makes
the code consistent with the rest of the kernel codebase.

Signed-off-by: Liang Luo <luoliang@kylinos.cn>
---
 kernel/sched/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index da20fb6ea25a..c2bf0fc6ac97 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3716,8 +3716,7 @@ ttwu_do_activate(struct rq *rq, struct task_struct *p, int wake_flags,
 		en_flags |= ENQUEUE_RQ_SELECTED;
 	if (wake_flags & WF_MIGRATED)
 		en_flags |= ENQUEUE_MIGRATED;
-	else
-	if (p->in_iowait) {
+	else if (p->in_iowait) {
 		delayacct_blkio_end(p);
 		atomic_dec(&task_rq(p)->nr_iowait);
 	}
--
2.45.0

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

end of thread, other threads:[~2026-06-09  8:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-08  7:18 [PATCH] sched/core: Combine separate 'else' and 'if' statements luoliang
2026-06-08  8:08 ` Peter Zijlstra
2026-06-09  8:32 ` [tip: sched/core] " tip-bot2 for Liang Luo
  -- strict thread matches above, loose matches on Subject: below --
2026-05-13  8:54 [PATCH] " luoliang
2026-05-15 16:24 ` Valentin Schneider

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®