From: kernel test robot <lkp@intel.com>
To: aubrey.li@linux.intel.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [anolis-intel-cloud:devel-6.6 0/1] mm/memory.c:6757:15: warning: unused variable 'pmd'
Date: Fri, 28 Feb 2025 16:59:36 +0800 [thread overview]
Message-ID: <202502281619.LbobQJMQ-lkp@intel.com> (raw)
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
reply other threads:[~2025-02-28 8:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202502281619.LbobQJMQ-lkp@intel.com \
--to=lkp@intel.com \
--cc=aubrey.li@linux.intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.