All of lore.kernel.org
 help / color / mirror / Atom feed
* [openeuler:OLK-5.10 2882/2882] mm/hugetlb.c:2216:9: warning: variable 'gfp' set but not used
@ 2025-07-02  7:14 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-07-02  7:14 UTC (permalink / raw)
  To: kernel, Ma Wupeng; +Cc: oe-kbuild-all

tree:   https://gitee.com/openeuler/kernel.git OLK-5.10
head:   4fdf755b0cabc80fc65da83c9da27ec2cee144dc
commit: 27a782f719fdab073c5b0e19764fad1f93cddd00 [2882/2882] mm/hugetlb: add support for mempolicy MPOL_PREFERRED_MANY
config: x86_64-randconfig-2002-20250501 (https://download.01.org/0day-ci/archive/20250702/202507020936.wpYnAMsn-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250702/202507020936.wpYnAMsn-lkp@intel.com/reproduce)

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/202507020936.wpYnAMsn-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> mm/hugetlb.c:2216:9: warning: variable 'gfp' set but not used [-Wunused-but-set-variable]
    2216 |                 gfp_t gfp = gfp_mask | __GFP_NOWARN;
         |                       ^
   1 warning 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-07-02  7:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-02  7:14 [openeuler:OLK-5.10 2882/2882] mm/hugetlb.c:2216:9: warning: variable 'gfp' set but not used kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.