]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
sched/core: Combine separate 'else' and 'if' statements
authorLiang Luo <luoliang@kylinos.cn>
Mon, 8 Jun 2026 07:18:42 +0000 (15:18 +0800)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 9 Jun 2026 08:28:08 +0000 (10:28 +0200)
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>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260608071842.325159-1-luoliang@kylinos.cn
kernel/sched/core.c

index e745c58671ed500e7d130b5d80cbb8fb8b404851..2f4530eb543f898d23a64a5b3b7bb598b8bf4929 100644 (file)
@@ -3816,8 +3816,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);
        }