[openeuler:OLK-6.6 2790/2790] mm/mempolicy.c:1115:25: warning: variable 'vma' set but not used

Hi Ze, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 18ca24a6500a925830b6e87fc4279a7456b57a4b commit: dba69db9a5fc7c2c9c0cda0f32bb3b5f3d73ef93 [2790/2790] mm/damon/vaddr: Add demotion interface for migrating cold pages to target nodemask config: arm64-randconfig-004-20250829 (https://download.01.org/0day-ci/archive/20250830/202508300319.Biz2ibcG-lkp@i...) compiler: aarch64-linux-gcc (GCC) 9.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250830/202508300319.Biz2ibcG-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/202508300319.Biz2ibcG-lkp@intel.com/ All warnings (new ones prefixed by >>): mm/mempolicy.c: In function 'migrate_area_to_node':
mm/mempolicy.c:1115:25: warning: variable 'vma' set but not used [-Wunused-but-set-variable] 1115 | struct vm_area_struct *vma; | ^~~
vim +/vma +1115 mm/mempolicy.c 1106 1107 /* 1108 * Migrate area pages from one node to a target node. 1109 * Returns error or the number of pages not migrated. 1110 */ 1111 static int migrate_area_to_node(struct mm_struct *mm, int source, int dest, 1112 unsigned long start, unsigned long end, int flags) 1113 { 1114 nodemask_t nmask;
1115 struct vm_area_struct *vma; 1116 LIST_HEAD(pagelist); 1117 int err = 0; 1118 struct migration_target_control mtc = { 1119 .nid = dest, 1120 .gfp_mask = GFP_HIGHUSER_MOVABLE | __GFP_THISNODE, 1121 }; 1122 1123 nodes_clear(nmask); 1124 node_set(source, nmask); 1125 1126 /* 1127 * This does not "check" the range but isolates all pages that 1128 * need migration. Between passing in the full user address 1129 * space range and MPOL_MF_DISCONTIG_OK, this call can not fail. 1130 */ 1131 vma = find_vma(mm, 0); 1132 VM_BUG_ON(!(flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL))); 1133 queue_pages_range(mm, start, end, &nmask, 1134 flags | MPOL_MF_DISCONTIG_OK, &pagelist, false); 1135 1136 if (!list_empty(&pagelist)) { 1137 err = migrate_pages(&pagelist, alloc_migration_target, NULL, 1138 (unsigned long)&mtc, MIGRATE_SYNC, MR_DAMON_DEMOTION, NULL); 1139 if (err) 1140 putback_movable_pages(&pagelist); 1141 } 1142 1143 return err; 1144 } 1145
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot