kernel/cpu.c:607:21: warning: variable 'cpu_smt_max_threads' set but not used
From: kernel test robot
Date: Sun Mar 29 2026 - 22:53:29 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7aaa8047eafd0bd628065b15757d9b48c5f9c07d
commit: 4496e1c1354bd4837bcc1414f6e1a4d042857903 crash_dump, nvme: select CONFIGFS_FS as built-in
date: 10 months ago
config: s390-randconfig-r072-20260330 (https://download.01.org/0day-ci/archive/20260330/202603301003.dnx2tDpD-lkp@xxxxxxxxx/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 2cd67b8b69f78e3f95918204320c3075a74ba16c)
smatch: v0.5.0-9004-gb810ac53
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260330/202603301003.dnx2tDpD-lkp@xxxxxxxxx/reproduce)
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 <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603301003.dnx2tDpD-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
>> kernel/cpu.c:607:21: warning: variable 'cpu_smt_max_threads' set but not used [-Wunused-but-set-global]
607 | static unsigned int cpu_smt_max_threads __ro_after_init;
| ^
1 warning generated.
vim +/cpu_smt_max_threads +607 kernel/cpu.c
3f9169196be555 Michael Ellerman 2023-07-05 605
0cc3cd21657be0 Thomas Gleixner 2018-06-29 606 enum cpuhp_smt_control cpu_smt_control __read_mostly = CPU_SMT_ENABLED;
447ae4ac41130a Michael Ellerman 2023-07-05 @607 static unsigned int cpu_smt_max_threads __ro_after_init;
447ae4ac41130a Michael Ellerman 2023-07-05 608 unsigned int cpu_smt_num_threads __read_mostly = UINT_MAX;
bc2d8d262cba57 Thomas Gleixner 2018-08-07 609
:::::: The code at line 607 was first introduced by commit
:::::: 447ae4ac41130a7f127c2581a5e816bb0800b560 cpu/SMT: Store the current/max number of threads
:::::: TO: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
:::::: CC: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki