[linux-next:master 6602/7397] mm/damon/paddr.c:360 __damon_pa_migrate_folio_list() error: uninitialized symbol 'nr_succeeded'.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   62c97045b8f720c2eac807a5f38e26c9ed512371
commit: 5311c0a2eee34fd8f4e17382a5f653b95a940ca5 [6602/7397] mm/damon/paddr: introduce DAMOS_MIGRATE_COLD action for demotion
config: um-randconfig-r071-20240623 (https://download.01.org/0day-ci/archive/20240625/202406251102.GE07hqfQ-lkp@xxxxxxxxx/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project ad79a14c9e5ec4a369eed4adf567c22cc029863f)

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>
| Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
| Closes: https://lore.kernel.org/r/202406251102.GE07hqfQ-lkp@xxxxxxxxx/

smatch warnings:
mm/damon/paddr.c:360 __damon_pa_migrate_folio_list() error: uninitialized symbol 'nr_succeeded'.

vim +/nr_succeeded +360 mm/damon/paddr.c

5311c0a2eee34f Honggyu Kim   2024-06-14  331  static unsigned int __damon_pa_migrate_folio_list(
5311c0a2eee34f Honggyu Kim   2024-06-14  332  		struct list_head *migrate_folios, struct pglist_data *pgdat,
5311c0a2eee34f Honggyu Kim   2024-06-14  333  		int target_nid)
5311c0a2eee34f Honggyu Kim   2024-06-14  334  {
5311c0a2eee34f Honggyu Kim   2024-06-14  335  	unsigned int nr_succeeded;
5311c0a2eee34f Honggyu Kim   2024-06-14  336  	nodemask_t allowed_mask = NODE_MASK_NONE;
5311c0a2eee34f Honggyu Kim   2024-06-14  337  	struct migration_target_control mtc = {
5311c0a2eee34f Honggyu Kim   2024-06-14  338  		/*
5311c0a2eee34f Honggyu Kim   2024-06-14  339  		 * Allocate from 'node', or fail quickly and quietly.
5311c0a2eee34f Honggyu Kim   2024-06-14  340  		 * When this happens, 'page' will likely just be discarded
5311c0a2eee34f Honggyu Kim   2024-06-14  341  		 * instead of migrated.
5311c0a2eee34f Honggyu Kim   2024-06-14  342  		 */
5311c0a2eee34f Honggyu Kim   2024-06-14  343  		.gfp_mask = (GFP_HIGHUSER_MOVABLE & ~__GFP_RECLAIM) |
5311c0a2eee34f Honggyu Kim   2024-06-14  344  			__GFP_NOWARN | __GFP_NOMEMALLOC | GFP_NOWAIT,
5311c0a2eee34f Honggyu Kim   2024-06-14  345  		.nid = target_nid,
5311c0a2eee34f Honggyu Kim   2024-06-14  346  		.nmask = &allowed_mask
5311c0a2eee34f Honggyu Kim   2024-06-14  347  	};
5311c0a2eee34f Honggyu Kim   2024-06-14  348  
5311c0a2eee34f Honggyu Kim   2024-06-14  349  	if (pgdat->node_id == target_nid || target_nid == NUMA_NO_NODE)
5311c0a2eee34f Honggyu Kim   2024-06-14  350  		return 0;
5311c0a2eee34f Honggyu Kim   2024-06-14  351  
5311c0a2eee34f Honggyu Kim   2024-06-14  352  	if (list_empty(migrate_folios))
5311c0a2eee34f Honggyu Kim   2024-06-14  353  		return 0;
5311c0a2eee34f Honggyu Kim   2024-06-14  354  
5311c0a2eee34f Honggyu Kim   2024-06-14  355  	/* Migration ignores all cpuset and mempolicy settings */
5311c0a2eee34f Honggyu Kim   2024-06-14  356  	migrate_pages(migrate_folios, alloc_migrate_folio, NULL,
5311c0a2eee34f Honggyu Kim   2024-06-14  357  		      (unsigned long)&mtc, MIGRATE_ASYNC, MR_DAMON,
5311c0a2eee34f Honggyu Kim   2024-06-14  358  		      &nr_succeeded);
5311c0a2eee34f Honggyu Kim   2024-06-14  359  
5311c0a2eee34f Honggyu Kim   2024-06-14 @360  	return nr_succeeded;

This can be compiled with CONFIG_MIGRATION disabled so migrate_pages()
is a no-op that returns -ENOSYS.

5311c0a2eee34f Honggyu Kim   2024-06-14  361  }

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





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux