* Re: [PATCH -next] smp: Move stub from main.c into smp.h
2022-05-28 11:11 [PATCH -next] smp: Move stub from main.c into smp.h Yue Zou
@ 2022-05-28 12:26 ` kernel test robot
2022-05-28 12:57 ` kernel test robot
2022-06-02 18:58 ` Thomas Gleixner
2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-05-28 12:26 UTC (permalink / raw)
To: Yue Zou, sfr, akpm, mhiramat, rostedt, ahalaney, vbabka, Jason,
mark-pk.tsai, linux-kernel
Cc: kbuild-all
Hi Yue,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on next-20220527]
url: https://github.com/intel-lab-lkp/linux/commits/Yue-Zou/smp-Move-stub-from-main-c-into-smp-h/20220528-185146
base: d3fde8ff50ab265749704bd7fbcf70d35235421f
config: x86_64-randconfig-a013 (https://download.01.org/0day-ci/archive/20220528/202205282032.H8Urbl9N-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/2efe286bd89edfa5448d29a5be89fd54df424c46
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Yue-Zou/smp-Move-stub-from-main-c-into-smp-h/20220528-185146
git checkout 2efe286bd89edfa5448d29a5be89fd54df424c46
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 prepare
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/lockdep.h:14,
from include/linux/spinlock.h:62,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from include/linux/crypto.h:20,
from arch/x86/kernel/asm-offsets.c:9:
>> include/linux/smp.h:186:27: warning: 'setup_max_cpus' defined but not used [-Wunused-const-variable=]
186 | static const unsigned int setup_max_cpus = NR_CPUS;
| ^~~~~~~~~~~~~~
--
fs/d_path.c:318:7: warning: no previous prototype for 'simple_dname' [-Wmissing-prototypes]
318 | char *simple_dname(struct dentry *dentry, char *buffer, int buflen)
| ^~~~~~~~~~~~
In file included from include/linux/lockdep.h:14,
from include/linux/spinlock.h:62,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/uapi/linux/aio_abi.h:31,
from include/linux/syscalls.h:77,
from fs/d_path.c:2:
>> include/linux/smp.h:186:27: warning: 'setup_max_cpus' defined but not used [-Wunused-const-variable=]
186 | static const unsigned int setup_max_cpus = NR_CPUS;
| ^~~~~~~~~~~~~~
--
fs/io_uring.c: In function '__io_submit_flush_completions':
fs/io_uring.c:3152:40: warning: variable 'prev' set but not used [-Wunused-but-set-variable]
3152 | struct io_wq_work_node *node, *prev;
| ^~~~
In file included from include/linux/lockdep.h:14,
from include/linux/spinlock.h:62,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/uapi/linux/aio_abi.h:31,
from include/linux/syscalls.h:77,
from fs/io_uring.c:45:
At top level:
>> include/linux/smp.h:186:27: warning: 'setup_max_cpus' defined but not used [-Wunused-const-variable=]
186 | static const unsigned int setup_max_cpus = NR_CPUS;
| ^~~~~~~~~~~~~~
--
In file included from include/linux/lockdep.h:14,
from include/linux/spinlock.h:62,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from include/linux/crypto.h:20,
from arch/x86/kernel/asm-offsets.c:9:
>> include/linux/smp.h:186:27: warning: 'setup_max_cpus' defined but not used [-Wunused-const-variable=]
186 | static const unsigned int setup_max_cpus = NR_CPUS;
| ^~~~~~~~~~~~~~
vim +/setup_max_cpus +186 include/linux/smp.h
185
> 186 static const unsigned int setup_max_cpus = NR_CPUS;
187 static inline void setup_nr_cpu_ids(void) { }
188 static inline void smp_prepare_cpus(unsigned int maxcpus) { }
189
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH -next] smp: Move stub from main.c into smp.h
2022-05-28 11:11 [PATCH -next] smp: Move stub from main.c into smp.h Yue Zou
2022-05-28 12:26 ` kernel test robot
@ 2022-05-28 12:57 ` kernel test robot
2022-06-02 18:58 ` Thomas Gleixner
2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-05-28 12:57 UTC (permalink / raw)
To: Yue Zou, sfr, akpm, mhiramat, rostedt, ahalaney, vbabka, Jason,
mark-pk.tsai, linux-kernel
Cc: kbuild-all
Hi Yue,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on next-20220527]
url: https://github.com/intel-lab-lkp/linux/commits/Yue-Zou/smp-Move-stub-from-main-c-into-smp-h/20220528-185146
base: d3fde8ff50ab265749704bd7fbcf70d35235421f
config: arc-randconfig-r043-20220526 (https://download.01.org/0day-ci/archive/20220528/202205282043.QMZuMrL0-lkp@intel.com/config)
compiler: arc-elf-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/2efe286bd89edfa5448d29a5be89fd54df424c46
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Yue-Zou/smp-Move-stub-from-main-c-into-smp-h/20220528-185146
git checkout 2efe286bd89edfa5448d29a5be89fd54df424c46
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash lib/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/lockdep.h:14,
from include/linux/spinlock.h:62,
from include/linux/kref.h:16,
from include/linux/mm_types.h:8,
from include/linux/buildid.h:5,
from include/linux/module.h:14,
from lib/test_bitops.c:9:
>> include/linux/smp.h:186:27: error: 'setup_max_cpus' defined but not used [-Werror=unused-const-variable=]
186 | static const unsigned int setup_max_cpus = NR_CPUS;
| ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/setup_max_cpus +186 include/linux/smp.h
185
> 186 static const unsigned int setup_max_cpus = NR_CPUS;
187 static inline void setup_nr_cpu_ids(void) { }
188 static inline void smp_prepare_cpus(unsigned int maxcpus) { }
189
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH -next] smp: Move stub from main.c into smp.h
2022-05-28 11:11 [PATCH -next] smp: Move stub from main.c into smp.h Yue Zou
2022-05-28 12:26 ` kernel test robot
2022-05-28 12:57 ` kernel test robot
@ 2022-06-02 18:58 ` Thomas Gleixner
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Gleixner @ 2022-06-02 18:58 UTC (permalink / raw)
To: Yue Zou, sfr, akpm, mhiramat, rostedt, ahalaney, vbabka, Jason,
mark-pk.tsai, linux-kernel
On Sat, May 28 2022 at 11:11, Yue Zou wrote:
> #else /* !SMP */
>
> +static const unsigned int setup_max_cpus = NR_CPUS;
This will cause a 'defined but not used warning' for all files which
include smp.h, except for init/main.c
Thanks,
tglx
^ permalink raw reply [flat|nested] 4+ messages in thread