tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 9e82708a746dc5d4ec8995a3e6edace2cf23c6fd commit: 6989680f878a16015e69291360e12cb9242e1360 [25742/30000] arm64: mm: Introduce procfs interface to update PBHA0 bit config: arm64-randconfig-002-20240312 (https://download.01.org/0day-ci/archive/20240314/202403141207.Ix7wfVox-lkp@i...) compiler: aarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240314/202403141207.Ix7wfVox-lkp@i...)
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/202403141207.Ix7wfVox-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/soc/hisilicon/pbha.c: In function 'pbha_bit0_pte_range':
drivers/soc/hisilicon/pbha.c:100:21: warning: variable 'ptent' set but not used [-Wunused-but-set-variable]
100 | pte_t *pte, ptent; | ^~~~~
vim +/ptent +100 drivers/soc/hisilicon/pbha.c
94 95 static int pbha_bit0_pte_range(pmd_t *pmd, unsigned long addr, 96 unsigned long end, struct mm_walk *walk) 97 { 98 int *op = (int *)walk->private; 99 struct vm_area_struct *vma = walk->vma;
100 pte_t *pte, ptent;
101 spinlock_t *ptl; 102 bool set = (*op == SET_PBHA_BIT0_FLAG); 103 104 ptl = pmd_trans_huge_lock(pmd, vma); 105 if (ptl) { 106 pbha_bit0_update_pmd_bits(vma, addr, pmd, set); 107 108 spin_unlock(ptl); 109 return 0; 110 } 111 112 if (pmd_trans_unstable(pmd)) 113 return 0; 114 115 pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl); 116 for (; addr != end; pte++, addr += PAGE_SIZE) { 117 ptent = *pte; 118 119 pbha_bit0_update_pte_bits(vma, addr, pte, set); 120 } 121 pte_unmap_unlock(pte - 1, ptl); 122 cond_resched(); 123 return 0; 124 } 125