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

tree:   https://gitee.com/anolis/intel-cloud-kernel.git devel-6.6
head:   83b17ccb9899d35bc10eaa78f87da816e711f9e3
commit: f1c74747e787a574212337dae6baea4177ec03e6 [0/1] anolis: mm: support fast reflink
config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20250228/202502281619.LbobQJMQ-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/20250228/202502281619.LbobQJMQ-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/202502281619.LbobQJMQ-lkp@intel.com/

All warnings (new ones prefixed by >>):

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


vim +/pmd +6757 mm/memory.c

  6748	
  6749	static void fr_apply_vma(struct vm_area_struct *vma)
  6750	{
  6751		struct mm_struct *mm = vma->vm_mm;
  6752		unsigned long start = vma->vm_start;
  6753		unsigned long end = vma->vm_end;
  6754		unsigned long next;
  6755		spinlock_t *pml;
  6756		pmd_t *pmdp = NULL;
> 6757		pmd_t pmd;
  6758		bool applied = false;
  6759	
  6760		do {
  6761			next = pmd_addr_end(start, end);
  6762			if (follow_pmd(mm, start, &pmdp))
  6763				continue;
  6764	
  6765			pml = pmd_lock(mm, pmdp);
  6766			if (pmd_huge(*pmdp)) {
  6767	#ifdef CONFIG_FS_DAX_PMD
  6768				if (!pmd_dirty(*pmdp) && !pmd_write(*pmdp))
  6769					goto unlock_pmd;
  6770	
  6771				pmd = pmdp_invalidate(vma, start, pmdp);
  6772				pmd = pmd_wrprotect(pmd);
  6773				pmd = pmd_mkclean(pmd);
  6774				set_pmd_at(mm, start, pmdp, pmd);
  6775	unlock_pmd:
  6776	#endif
  6777				spin_unlock(pml);
  6778				continue;
  6779			}
  6780	
  6781			if (pmd_none(*pmdp) || unlikely(pmd_bad(*pmdp))) {
  6782				spin_unlock(pml);
  6783				continue;
  6784			}
  6785	
  6786			if (IS_ALIGNED(start, PMD_SIZE) && (start + PMD_SIZE <= end)) {
  6787				pmdp_set_tbl_wrprotect(mm, start, pmdp);
  6788				flush_tlb_range(vma, start, start + PMD_SIZE);
  6789				applied = true;
  6790				spin_unlock(pml);
  6791				continue;
  6792			} else {
  6793				spin_unlock(pml);
  6794				fr_apply_pte_range(vma, pmdp, start, next);
  6795				flush_tlb_range(vma, start, next);
  6796				continue;
  6797			}
  6798		} while (start = next, start != end);
  6799	
  6800		if (applied)
  6801			vma->fast_reflink = applied;
  6802	}
  6803	

-- 
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-02-28  8:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-28  8:59 [anolis-intel-cloud:devel-6.6 0/1] mm/memory.c:6757: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.