[tip:x86/apic 1/2] include/linux/smp.h:221:27: error: 'setup_max_cpus' defined but not used

From: kernel test robot
Date: Mon Feb 26 2024 - 21:59:12 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/apic
head: 62aaed88843a9a69b5614f99ec4a2930edd09658
commit: 429bb0269058e2e1f4ab69a0d33d374933aa15b9 [1/2] smp: Provide 'setup_max_cpus' definition on UP too
config: arm-randconfig-004-20240227 (https://download.01.org/0day-ci/archive/20240227/202402271008.YvpQ54cP-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240227/202402271008.YvpQ54cP-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/202402271008.YvpQ54cP-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

In file included from include/linux/lockdep.h:14,
from include/linux/spinlock.h:63,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:17,
from lib/test_bitops.c:9:
>> include/linux/smp.h:221:27: error: 'setup_max_cpus' defined but not used [-Werror=unused-const-variable=]
221 | static const unsigned int setup_max_cpus = 0;
| ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors


vim +/setup_max_cpus +221 include/linux/smp.h

220
> 221 static const unsigned int setup_max_cpus = 0;
222

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