Skip to contentSkip to conversation

kernel/sched/ext.c:5884 scx_enable() warn: inconsistent indenting

PATCH kernel test robot 1 participant 1 message Mar 11

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   7109a2155340cc7b21f27e832ece6df03592f2e8
commit: ebeca1f930eac8f11f815d58eb38fa5d07e7c16e [3603/5327] sched_ext: Introduce cgroup sub-sched support
config: sparc64-randconfig-r071-20260311 (https://download.01.org/0day-ci/archive/20260311/[email protected]/config)
compiler: sparc64-linux-gcc (GCC) 15.2.0
smatch: v0.5.0-9004-gb810ac53

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

smatch warnings:
kernel/sched/ext.c:5884 scx_enable() warn: inconsistent indenting

vim +5884 kernel/sched/ext.c

ebeca1f930eac8 Tejun Heo 2026-03-06  5852  
dbd542a8fac7bc Tejun Heo 2026-03-06  5853  static s32 scx_enable(struct sched_ext_ops *ops, struct bpf_link *link)
b06ccbabe2506f Tejun Heo 2026-03-03  5854  {
b06ccbabe2506f Tejun Heo 2026-03-03  5855  	static struct kthread_worker *helper;
b06ccbabe2506f Tejun Heo 2026-03-03  5856  	static DEFINE_MUTEX(helper_mutex);
b06ccbabe2506f Tejun Heo 2026-03-03  5857  	struct scx_enable_cmd cmd;
b06ccbabe2506f Tejun Heo 2026-03-03  5858  
b06ccbabe2506f Tejun Heo 2026-03-03  5859  	if (!cpumask_equal(housekeeping_cpumask(HK_TYPE_DOMAIN),
b06ccbabe2506f Tejun Heo 2026-03-03  5860  			   cpu_possible_mask)) {
b06ccbabe2506f Tejun Heo 2026-03-03  5861  		pr_err("sched_ext: Not compatible with \"isolcpus=\" domain isolation\n");
b06ccbabe2506f Tejun Heo 2026-03-03  5862  		return -EINVAL;
b06ccbabe2506f Tejun Heo 2026-03-03  5863  	}
b06ccbabe2506f Tejun Heo 2026-03-03  5864  
b06ccbabe2506f Tejun Heo 2026-03-03  5865  	if (!READ_ONCE(helper)) {
b06ccbabe2506f Tejun Heo 2026-03-03  5866  		mutex_lock(&helper_mutex);
b06ccbabe2506f Tejun Heo 2026-03-03  5867  		if (!helper) {
b06ccbabe2506f Tejun Heo 2026-03-03  5868  			helper = kthread_run_worker(0, "scx_enable_helper");
b06ccbabe2506f Tejun Heo 2026-03-03  5869  			if (IS_ERR_OR_NULL(helper)) {
b06ccbabe2506f Tejun Heo 2026-03-03  5870  				helper = NULL;
b06ccbabe2506f Tejun Heo 2026-03-03  5871  				mutex_unlock(&helper_mutex);
b06ccbabe2506f Tejun Heo 2026-03-03  5872  				return -ENOMEM;
b06ccbabe2506f Tejun Heo 2026-03-03  5873  			}
b06ccbabe2506f Tejun Heo 2026-03-03  5874  			sched_set_fifo(helper->task);
b06ccbabe2506f Tejun Heo 2026-03-03  5875  		}
b06ccbabe2506f Tejun Heo 2026-03-03  5876  		mutex_unlock(&helper_mutex);
b06ccbabe2506f Tejun Heo 2026-03-03  5877  	}
b06ccbabe2506f Tejun Heo 2026-03-03  5878  
ebeca1f930eac8 Tejun Heo 2026-03-06  5879  #ifdef CONFIG_EXT_SUB_SCHED
ebeca1f930eac8 Tejun Heo 2026-03-06  5880  	if (ops->sub_cgroup_id > 1)
ebeca1f930eac8 Tejun Heo 2026-03-06  5881  		kthread_init_work(&cmd.work, scx_sub_enable_workfn);
ebeca1f930eac8 Tejun Heo 2026-03-06  5882  	else
ebeca1f930eac8 Tejun Heo 2026-03-06  5883  #endif	/* CONFIG_EXT_SUB_SCHED */
dbd542a8fac7bc Tejun Heo 2026-03-06 @5884  		kthread_init_work(&cmd.work, scx_root_enable_workfn);
b06ccbabe2506f Tejun Heo 2026-03-03  5885  	cmd.ops = ops;
b06ccbabe2506f Tejun Heo 2026-03-03  5886  
b06ccbabe2506f Tejun Heo 2026-03-03  5887  	kthread_queue_work(READ_ONCE(helper), &cmd.work);
b06ccbabe2506f Tejun Heo 2026-03-03  5888  	kthread_flush_work(&cmd.work);
b06ccbabe2506f Tejun Heo 2026-03-03  5889  	return cmd.ret;
f0e1a0643a59bf Tejun Heo 2024-06-18  5890  }
f0e1a0643a59bf Tejun Heo 2024-06-18  5891  

:::::: The code at line 5884 was first introduced by commit
:::::: dbd542a8fac7bcfba91e353f2a522e1bf2fbee27 sched_ext: Reorganize enable/disable path for multi-scheduler support

:::::: TO: Tejun Heo <[email protected]>
:::::: CC: Tejun Heo <[email protected]>

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki