]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sched/core: Refactor the task_flags check for worker sleeping in sched_submit_work()
authorWang Jinchao <wangjinchao@xfusion.com>
Sun, 20 Aug 2023 12:53:17 +0000 (20:53 +0800)
committerIngo Molnar <mingo@kernel.org>
Sun, 24 Sep 2023 10:15:06 +0000 (12:15 +0200)
commit3eafe225995c67f8c179011ec2d6e4c12b32a53d
tree0d3925bb47c4a01be52330ac0648e9aece2c9c5b
parent2f8c62296b6f656bbfd17e9f1fadd7478003a9d9
sched/core: Refactor the task_flags check for worker sleeping in sched_submit_work()

Simplify the conditional logic for checking worker flags
by splitting the original compound `if` statement into
separate `if` and `else if` clauses.

This modification not only retains the previous functionality,
but also reduces a single `if` check, improving code clarity
and potentially enhancing performance.

Signed-off-by: Wang Jinchao <wangjinchao@xfusion.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/ZOIMvURE99ZRAYEj@fedora
kernel/sched/core.c