sched_ext: Fix inconsistent indenting in scx_enable()
Subsystems (2)
PATCH 1/1 sched_ext: Fix inconsistent indenting in scx_enable()
When CONFIG_EXT_SUB_SCHED is disabled, the #ifdef block in scx_enable() splits an if/else statement. This leaves the fallback kthread_init_work() with an extra indentation level, triggering an inconsistent indenting warning from smatch.
Fix this by adding an explicit #else branch, keeping macro boundaries clean and proper indentation across all configs.
Reported-by kernel test robot <[email protected]>
Signed-off-by Cheng-Yang Chou <[email protected]>
--- kernel/sched/ext.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/sched/ext.c +3 -1
@@ -6914,8 +6914,10 @@ static s32 scx_enable(struct sched_ext_ops *ops, struct bpf_link *link)if (ops->sub_cgroup_id >1 )kthread_init_work (&cmd.work, scx_sub_enable_workfn);else -#endif /* CONFIG_EXT_SUB_SCHED */ kthread_init_work (&cmd.work, scx_root_enable_workfn); +#else +kthread_init_work (&cmd.work, scx_root_enable_workfn); +#endif /* CONFIG_EXT_SUB_SCHED */ cmd.ops = ops;kthread_queue_work (READ_ONCE (helper), &cmd.work);
Signature · 1 line
2.48.1