[arm:aarch64/hotplug-vcpu/v6.6-rc6 7/39] drivers/base/node.c:870:13: warning: unused variable 'cpu'

kernel test robot lkp at intel.com
Fri Oct 20 13:23:53 PDT 2023


tree:   git://git.armlinux.org.uk/~rmk/linux-arm.git aarch64/hotplug-vcpu/v6.6-rc6
head:   35c66c6568cfd2b434e18ed82dcdefd03f8e986c
commit: b2e76aa62afbbd6fb72aa8485e1f042c9414da34 [7/39] drivers: base: remove unnecessary call to register_cpu_under_node()
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20231021/202310210408.4VoVxRzH-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231021/202310210408.4VoVxRzH-lkp@intel.com/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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310210408.4VoVxRzH-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/base/node.c: In function '__register_one_node':
>> drivers/base/node.c:870:13: warning: unused variable 'cpu' [-Wunused-variable]
     870 |         int cpu;
         |             ^~~


vim +/cpu +870 drivers/base/node.c

4faf8d950ec438 Lee Schermerhorn  2009-12-14  866  
9037a9934349b0 Michal Hocko      2017-07-06  867  int __register_one_node(int nid)
0fc44159bfcb5b Yasunori Goto     2006-06-27  868  {
9037a9934349b0 Michal Hocko      2017-07-06  869  	int error;
9037a9934349b0 Michal Hocko      2017-07-06 @870  	int cpu;
0fc44159bfcb5b Yasunori Goto     2006-06-27  871  
8732794b166196 Wen Congyang      2012-12-11  872  	node_devices[nid] = kzalloc(sizeof(struct node), GFP_KERNEL);
8732794b166196 Wen Congyang      2012-12-11  873  	if (!node_devices[nid])
8732794b166196 Wen Congyang      2012-12-11  874  		return -ENOMEM;
8732794b166196 Wen Congyang      2012-12-11  875  
a7be6e5a7f8da4 Dou Liyang        2017-07-10  876  	error = register_node(node_devices[nid], nid);
76b67ed9dce69a KAMEZAWA Hiroyuki 2006-06-27  877  
08d9dbe72b1f89 Keith Busch       2019-03-11  878  	INIT_LIST_HEAD(&node_devices[nid]->access_list);
acc02a109b0497 Keith Busch       2019-03-11  879  	node_init_caches(nid);
0fc44159bfcb5b Yasunori Goto     2006-06-27  880  
0fc44159bfcb5b Yasunori Goto     2006-06-27  881  	return error;
0fc44159bfcb5b Yasunori Goto     2006-06-27  882  }
0fc44159bfcb5b Yasunori Goto     2006-06-27  883  

:::::: The code at line 870 was first introduced by commit
:::::: 9037a9934349b0e180896fc8cacaf1819418ba03 mm, memory_hotplug: split up register_one_node()

:::::: TO: Michal Hocko <mhocko at suse.com>
:::::: CC: Linus Torvalds <torvalds at linux-foundation.org>

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



More information about the linux-arm-kernel mailing list