tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 9d0af12b79bee784902822ddeec2e1a8cfc18524 commit: 5d3b64fd78b80ec49285f2186e7b5ac5850f76e4 [2528/15331] etmem: add etmem scan feature config: arm64-randconfig-003-20241027 (https://download.01.org/0day-ci/archive/20241028/202410280704.1qI2EjWL-lkp@i...) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241028/202410280704.1qI2EjWL-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/202410280704.1qI2EjWL-lkp@intel.com/
All warnings (new ones prefixed by >>):
fs/proc/etmem_scan.c: In function 'mm_idle_walk_range': fs/proc/etmem_scan.c:1258:61: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] 1258 | pic->next_hva, end); | ^
fs/proc/etmem_scan.c:1261:45: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
1261 | debug_printk("nothing read"); | ^
vim +/else +1261 fs/proc/etmem_scan.c
1216 1217 static int mm_idle_walk_range(struct page_idle_ctrl *pic, 1218 unsigned long start, 1219 unsigned long end, 1220 struct mm_walk *walk) 1221 { 1222 struct vm_area_struct *vma; 1223 int ret = 0; 1224 1225 ret = init_page_idle_ctrl_buffer(pic); 1226 if (ret) 1227 return ret; 1228 1229 for (; start < end;) { 1230 mmap_read_lock(walk->mm); 1231 vma = find_vma(walk->mm, start); 1232 if (vma) { 1233 if (end > vma->vm_start) { 1234 local_irq_disable(); 1235 ret = walk_page_range(walk->mm, start, end, 1236 walk->ops, walk->private); 1237 local_irq_enable(); 1238 } else 1239 set_restart_gpa(vma->vm_start, "VMA-HOLE"); 1240 } else 1241 set_restart_gpa(TASK_SIZE, "EOF"); 1242 mmap_read_unlock(walk->mm); 1243 WARN_ONCE(pic->gpa_to_hva, "non-zero gpa_to_hva"); 1244 if (ret != PAGE_IDLE_KBUF_FULL && end > pic->restart_gpa) 1245 pic->restart_gpa = end; 1246 start = pic->restart_gpa; 1247 ret = page_idle_copy_user(pic, start, end); 1248 if (ret) 1249 break; 1250 } 1251 1252 if (start > pic->next_hva) 1253 set_next_hva(start, "NEXT-START"); 1254 1255 if (pic->bytes_copied) { 1256 if (ret != PAGE_IDLE_BUF_FULL && pic->next_hva < end) 1257 debug_printk("partial scan: next_hva=%pK end=%pK\n",
1258 pic->next_hva, end);
1259 ret = 0; 1260 } else
1261 debug_printk("nothing read");
1262 return ret; 1263 } 1264