All of lore.kernel.org
 help / color / mirror / Atom feed
* [anolis-intel-cloud:devel-5.10 9/9] mm/memory.c:5965:15: warning: unused variable 'pmd'
@ 2025-04-08  9:15 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-04-08  9:15 UTC (permalink / raw)
  To: aubrey.li; +Cc: oe-kbuild-all

Hi Xu,

FYI, the error/warning still remains.

tree:   https://gitee.com/anolis/intel-cloud-kernel.git devel-5.10
head:   c55bd07f747cd457f58e5781279fa11a5fc0add1
commit: bd617fc27c23d34e76440e74b3834c287b878d07 [9/9] anolis: mm: support fast reflink
config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20250408/202504081759.bcVX84ca-lkp@intel.com/config)
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/20250408/202504081759.bcVX84ca-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/202504081759.bcVX84ca-lkp@intel.com/

All warnings (new ones prefixed by >>):

   mm/memory.c: In function 'fr_apply_vma':
>> mm/memory.c:5965:15: warning: unused variable 'pmd' [-Wunused-variable]
    5965 |         pmd_t pmd;
         |               ^~~


vim +/pmd +5965 mm/memory.c

  5956	
  5957	static void fr_apply_vma(struct vm_area_struct *vma)
  5958	{
  5959		struct mm_struct *mm = vma->vm_mm;
  5960		unsigned long start = vma->vm_start;
  5961		unsigned long end = vma->vm_end;
  5962		unsigned long next;
  5963		spinlock_t *pml;
  5964		pmd_t *pmdp = NULL;
> 5965		pmd_t pmd;
  5966		bool applied = false;
  5967	
  5968		do {
  5969			next = pmd_addr_end(start, end);
  5970			if (follow_pmd(mm, start, &pmdp))
  5971				continue;
  5972	
  5973			pml = pmd_lock(mm, pmdp);
  5974			if (pmd_huge(*pmdp)) {
  5975	#ifdef CONFIG_FS_DAX_PMD
  5976				if (!pmd_dirty(*pmdp) && !pmd_write(*pmdp))
  5977					goto unlock_pmd;
  5978	
  5979				pmd = pmdp_invalidate(vma, start, pmdp);
  5980				pmd = pmd_wrprotect(pmd);
  5981				pmd = pmd_mkclean(pmd);
  5982				set_pmd_at(mm, start, pmdp, pmd);
  5983	unlock_pmd:
  5984	#endif
  5985				spin_unlock(pml);
  5986				continue;
  5987			}
  5988	
  5989			if (pmd_none(*pmdp) || unlikely(pmd_bad(*pmdp))) {
  5990				spin_unlock(pml);
  5991				continue;
  5992			}
  5993	
  5994			if (IS_ALIGNED(start, PMD_SIZE) && (start + PMD_SIZE <= end)) {
  5995				pmdp_set_tbl_wrprotect(mm, start, pmdp);
  5996				flush_tlb_range(vma, start, start + PMD_SIZE);
  5997				applied = true;
  5998				spin_unlock(pml);
  5999				continue;
  6000			} else {
  6001				spin_unlock(pml);
  6002				fr_apply_pte_range(vma, pmdp, start, next);
  6003				flush_tlb_range(vma, start, next);
  6004				continue;
  6005			}
  6006		} while (start = next, start != end);
  6007	
  6008		if (applied)
  6009			vma->fast_reflink = applied;
  6010	}
  6011	

-- 
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-04-08  9:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-08  9:15 [anolis-intel-cloud:devel-5.10 9/9] mm/memory.c:5965:15: warning: unused variable 'pmd' 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.