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-5.10 9/9] mm/memory.c:5965:15: warning: unused variable 'pmd'
Date: Tue, 8 Apr 2025 17:15:32 +0800 [thread overview]
Message-ID: <202504081759.bcVX84ca-lkp@intel.com> (raw)
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
reply other threads:[~2025-04-08 9:16 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=202504081759.bcVX84ca-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.