tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 13b424f97ef548612c760cfd0892f96de96707e0 commit: f38a43c2e1f2214acbda5d46af4518aa1d9d5e92 [14696/23701] mm: don't rely on system state to detect hot-plug operations config: x86_64-randconfig-123-20240906 (https://download.01.org/0day-ci/archive/20240907/202409072051.qFE23qXy-lkp@i...) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240907/202409072051.qFE23qXy-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/202409072051.qFE23qXy-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/base/node.c:429:5: sparse: sparse: symbol 'register_mem_block_under_node_early' was not declared. Should it be static?
drivers/base/node.c:429:5: warning: no previous prototype for 'register_mem_block_under_node_early' [-Wmissing-prototypes] 429 | int register_mem_block_under_node_early(struct memory_block *mem_blk, void *arg) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/register_mem_block_under_node_early +429 drivers/base/node.c
427 428 /* register memory section under specified node if it spans that node */
429 int register_mem_block_under_node_early(struct memory_block *mem_blk, void *arg)
430 { 431 int nid = *(int *)arg; 432 unsigned long pfn, sect_start_pfn, sect_end_pfn; 433 434 sect_start_pfn = section_nr_to_pfn(mem_blk->start_section_nr); 435 sect_end_pfn = section_nr_to_pfn(mem_blk->end_section_nr); 436 sect_end_pfn += PAGES_PER_SECTION - 1; 437 for (pfn = sect_start_pfn; pfn <= sect_end_pfn; pfn++) { 438 int page_nid; 439 440 /* 441 * memory block could have several absent sections from start. 442 * skip pfn range from absent section 443 */ 444 if (!pfn_present(pfn)) { 445 pfn = round_down(pfn + PAGES_PER_SECTION, 446 PAGES_PER_SECTION) - 1; 447 continue; 448 } 449 450 /* 451 * We need to check if page belongs to nid only at the boot 452 * case because node's ranges can be interleaved. 453 */ 454 page_nid = get_nid_for_pfn(pfn); 455 if (page_nid < 0) 456 continue; 457 if (page_nid != nid) 458 continue; 459 460 return do_register_memory_block_under_node(nid, mem_blk); 461 } 462 /* mem section does not span the specified node */ 463 return 0; 464 } 465