Re: [PATCH v2] arch_topology: Support SMT control on arm64

From: kernel test robot
Date: Thu Oct 12 2023 - 12:00:33 EST


Hi Yicong,

kernel test robot noticed the following build warnings:

[auto build test WARNING on arm64/for-next/core]
[also build test WARNING on driver-core/driver-core-testing driver-core/driver-core-next driver-core/driver-core-linus soc/for-next linus/master v6.6-rc5 next-20231012]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Yicong-Yang/arch_topology-Support-SMT-control-on-arm64/20231010-195926
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
patch link: https://lore.kernel.org/r/20231010115335.13862-1-yangyicong%40huawei.com
patch subject: [PATCH v2] arch_topology: Support SMT control on arm64
config: arm64-randconfig-004-20231012 (https://download.01.org/0day-ci/archive/20231012/202310122334.Q66kv9Wm-lkp@xxxxxxxxx/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231012/202310122334.Q66kv9Wm-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/202310122334.Q66kv9Wm-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

In file included from include/linux/cpumask.h:12,
from include/linux/smp.h:13,
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/slab.h:16,
from include/linux/resource_ext.h:11,
from include/linux/acpi.h:13,
from drivers/base/arch_topology.c:9:
In function 'bitmap_or',
inlined from 'cpumask_or' at include/linux/cpumask.h:582:2,
inlined from 'topology_smt_set_num_threads' at drivers/base/arch_topology.c:745:2:
>> include/linux/bitmap.h:330:24: warning: 'to_visit' is used uninitialized [-Wuninitialized]
330 | *dst = *src1 | *src2;
| ^~~~~
drivers/base/arch_topology.c: In function 'topology_smt_set_num_threads':
drivers/base/arch_topology.c:738:23: note: 'to_visit' declared here
738 | cpumask_var_t to_visit;
| ^~~~~~~~


vim +/to_visit +330 include/linux/bitmap.h

^1da177e4c3f41 Linus Torvalds 2005-04-16 325
^1da177e4c3f41 Linus Torvalds 2005-04-16 326 static inline void bitmap_or(unsigned long *dst, const unsigned long *src1,
2f9305eb31097f Rasmus Villemoes 2014-08-06 327 const unsigned long *src2, unsigned int nbits)
^1da177e4c3f41 Linus Torvalds 2005-04-16 328 {
4b0bc0bca83f3f Rusty Russell 2008-12-30 329 if (small_const_nbits(nbits))
^1da177e4c3f41 Linus Torvalds 2005-04-16 @330 *dst = *src1 | *src2;
^1da177e4c3f41 Linus Torvalds 2005-04-16 331 else
^1da177e4c3f41 Linus Torvalds 2005-04-16 332 __bitmap_or(dst, src1, src2, nbits);
^1da177e4c3f41 Linus Torvalds 2005-04-16 333 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 334

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