
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 2eb609d2f89b2d85d89cb018c3f97050989807e2 commit: 8de9a7ef5533b50d0054c06cb04bd266ecac17b7 [1646/1646] mm/memory_hotplug: shrink zones when offlining memory config: arm64-randconfig-001-20250520 (https://download.01.org/0day-ci/archive/20250520/202505201731.rOzzhiIH-lkp@i...) compiler: aarch64-linux-gcc (GCC) 13.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250520/202505201731.rOzzhiIH-lkp@i...) 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@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505201731.rOzzhiIH-lkp@intel.com/ All warnings (new ones prefixed by >>): mm/memory_hotplug.c: In function '__remove_section':
mm/memory_hotplug.c:482:23: warning: variable 'start_pfn' set but not used [-Wunused-but-set-variable] 482 | unsigned long start_pfn; | ^~~~~~~~~
vim +/start_pfn +482 mm/memory_hotplug.c 815121d2b5cd56 Yasuaki Ishimatsu 2013-02-22 478 8de9a7ef5533b5 David Hildenbrand 2020-09-22 479 static void __remove_section(struct mem_section *ms, unsigned long map_offset, b9f9a54ea6ea41 David Hildenbrand 2020-09-22 480 struct vmem_altmap *altmap) ea01ea937dcae2 Badari Pulavarty 2008-04-28 481 { 815121d2b5cd56 Yasuaki Ishimatsu 2013-02-22 @482 unsigned long start_pfn; 815121d2b5cd56 Yasuaki Ishimatsu 2013-02-22 483 int scn_nr; ea01ea937dcae2 Badari Pulavarty 2008-04-28 484 b9f9a54ea6ea41 David Hildenbrand 2020-09-22 485 if (WARN_ON_ONCE(!valid_section(ms))) b9f9a54ea6ea41 David Hildenbrand 2020-09-22 486 return; ea01ea937dcae2 Badari Pulavarty 2008-04-28 487 815121d2b5cd56 Yasuaki Ishimatsu 2013-02-22 488 scn_nr = __section_nr(ms); 1dd2bfc86818dd YASUAKI ISHIMATSU 2017-10-03 489 start_pfn = section_nr_to_pfn((unsigned long)scn_nr); 815121d2b5cd56 Yasuaki Ishimatsu 2013-02-22 490 457dd3c8002ca0 David Hildenbrand 2020-09-22 491 sparse_remove_one_section(ms, map_offset, altmap); ea01ea937dcae2 Badari Pulavarty 2008-04-28 492 } ea01ea937dcae2 Badari Pulavarty 2008-04-28 493 :::::: The code at line 482 was first introduced by commit :::::: 815121d2b5cd56f1757d4468dc3abadd06a0ed6b memory_hotplug: clear zone when removing the memory :::::: TO: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> :::::: CC: Linus Torvalds <torvalds@linux-foundation.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki