
Hi Ben, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 263072f655dcd6fd63f7d5dd1f9c5553134982fa commit: 27a782f719fdab073c5b0e19764fad1f93cddd00 [2729/2729] mm/hugetlb: add support for mempolicy MPOL_PREFERRED_MANY config: x86_64-buildonly-randconfig-004-20250208 (https://download.01.org/0day-ci/archive/20250209/202502090535.KiiKAKub-lkp@i...) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250209/202502090535.KiiKAKub-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/202502090535.KiiKAKub-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from mm/hugetlb.c:8: In file included from include/linux/mm.h:1573: include/linux/vmstat.h:431:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 431 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~
mm/hugetlb.c:2216:9: warning: variable 'gfp' set but not used [-Wunused-but-set-variable] 2216 | gfp_t gfp = gfp_mask | __GFP_NOWARN; | ^ 2 warnings generated.
vim +/gfp +2216 mm/hugetlb.c 2200 2201 /* 2202 * Use the VMA's mpolicy to allocate a huge page from the buddy. 2203 */ 2204 static 2205 struct page *alloc_buddy_huge_page_with_mpol(struct hstate *h, 2206 struct vm_area_struct *vma, unsigned long addr) 2207 { 2208 struct page *page = NULL; 2209 struct mempolicy *mpol; 2210 gfp_t gfp_mask = htlb_alloc_mask(h); 2211 int nid; 2212 nodemask_t *nodemask; 2213 2214 nid = huge_node(vma, addr, gfp_mask, &mpol, &nodemask); 2215 if (mpol_is_preferred_many(mpol)) {
2216 gfp_t gfp = gfp_mask | __GFP_NOWARN; 2217 2218 gfp &= ~(__GFP_DIRECT_RECLAIM | __GFP_NOFAIL); 2219 page = alloc_surplus_huge_page(h, gfp_mask, nid, nodemask); 2220 2221 /* Fallback to all nodes if page==NULL */ 2222 nodemask = NULL; 2223 } 2224 2225 if (!page) 2226 page = alloc_surplus_huge_page(h, gfp_mask, nid, nodemask); 2227 mpol_cond_put(mpol); 2228 return page; 2229 } 2230
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki