Hi Kairui, kernel test robot noticed the following build warnings: [auto build test WARNING on akpm-mm/mm-everything] [also build test WARNING on linus/master v6.7-rc2 next-20231117] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Kairui-Song/mm-swap-fix-a-potential-undefined-behavior-issue/20231120-035926 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/20231119194740.94101-7-ryncsn%40gmail.com patch subject: [PATCH 06/24] swap: rework swapin_no_readahead arguments config: i386-buildonly-randconfig-003-20231120 (https://download.01.org/0day-ci/archive/20231120/202311200826.8Nl5w3h8-lkp@xxxxxxxxx/config) compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231120/202311200826.8Nl5w3h8-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202311200826.8Nl5w3h8-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): >> mm/swap_state.c:872: warning: Function parameter or member 'mpol' not described in 'swapin_no_readahead' >> mm/swap_state.c:872: warning: Function parameter or member 'ilx' not described in 'swapin_no_readahead' >> mm/swap_state.c:872: warning: Function parameter or member 'mm' not described in 'swapin_no_readahead' >> mm/swap_state.c:872: warning: Excess function parameter 'vmf' description in 'swapin_no_readahead' vim +872 mm/swap_state.c d9bfcfdc41e8e5 Huang Ying 2017-09-06 859 19f582d2684e47 Kairui Song 2023-11-20 860 /** 19f582d2684e47 Kairui Song 2023-11-20 861 * swapin_no_readahead - swap in pages skipping swap cache and readahead 19f582d2684e47 Kairui Song 2023-11-20 862 * @entry: swap entry of this memory 19f582d2684e47 Kairui Song 2023-11-20 863 * @gfp_mask: memory allocation flags 19f582d2684e47 Kairui Song 2023-11-20 864 * @vmf: fault information 19f582d2684e47 Kairui Song 2023-11-20 865 * 19f582d2684e47 Kairui Song 2023-11-20 866 * Returns the struct page for entry and addr after the swap entry is read 19f582d2684e47 Kairui Song 2023-11-20 867 * in. 19f582d2684e47 Kairui Song 2023-11-20 868 */ 598f2616cde014 Kairui Song 2023-11-20 869 static struct page *swapin_no_readahead(swp_entry_t entry, gfp_t gfp_mask, 2538a5e96fe62f Kairui Song 2023-11-20 870 struct mempolicy *mpol, pgoff_t ilx, 2538a5e96fe62f Kairui Song 2023-11-20 871 struct mm_struct *mm) 19f582d2684e47 Kairui Song 2023-11-20 @872 { 19f582d2684e47 Kairui Song 2023-11-20 873 struct folio *folio; 2538a5e96fe62f Kairui Song 2023-11-20 874 struct page *page; 19f582d2684e47 Kairui Song 2023-11-20 875 void *shadow = NULL; 19f582d2684e47 Kairui Song 2023-11-20 876 2538a5e96fe62f Kairui Song 2023-11-20 877 page = alloc_pages_mpol(gfp_mask, 0, mpol, ilx, numa_node_id()); 2538a5e96fe62f Kairui Song 2023-11-20 878 folio = (struct folio *)page; 19f582d2684e47 Kairui Song 2023-11-20 879 if (folio) { 2538a5e96fe62f Kairui Song 2023-11-20 880 if (mem_cgroup_swapin_charge_folio(folio, mm, c2ac0dcbf9ab6a Kairui Song 2023-11-20 881 GFP_KERNEL, entry)) { 19f582d2684e47 Kairui Song 2023-11-20 882 folio_put(folio); 19f582d2684e47 Kairui Song 2023-11-20 883 return NULL; 19f582d2684e47 Kairui Song 2023-11-20 884 } c2ac0dcbf9ab6a Kairui Song 2023-11-20 885 c2ac0dcbf9ab6a Kairui Song 2023-11-20 886 __folio_set_locked(folio); c2ac0dcbf9ab6a Kairui Song 2023-11-20 887 __folio_set_swapbacked(folio); c2ac0dcbf9ab6a Kairui Song 2023-11-20 888 19f582d2684e47 Kairui Song 2023-11-20 889 mem_cgroup_swapin_uncharge_swap(entry); 19f582d2684e47 Kairui Song 2023-11-20 890 19f582d2684e47 Kairui Song 2023-11-20 891 shadow = get_shadow_from_swap_cache(entry); 19f582d2684e47 Kairui Song 2023-11-20 892 if (shadow) 19f582d2684e47 Kairui Song 2023-11-20 893 workingset_refault(folio, shadow); 19f582d2684e47 Kairui Song 2023-11-20 894 19f582d2684e47 Kairui Song 2023-11-20 895 folio_add_lru(folio); 19f582d2684e47 Kairui Song 2023-11-20 896 19f582d2684e47 Kairui Song 2023-11-20 897 /* To provide entry to swap_readpage() */ 19f582d2684e47 Kairui Song 2023-11-20 898 folio->swap = entry; 19f582d2684e47 Kairui Song 2023-11-20 899 swap_readpage(page, true, NULL); 19f582d2684e47 Kairui Song 2023-11-20 900 folio->private = NULL; 19f582d2684e47 Kairui Song 2023-11-20 901 } 19f582d2684e47 Kairui Song 2023-11-20 902 19f582d2684e47 Kairui Song 2023-11-20 903 return page; 19f582d2684e47 Kairui Song 2023-11-20 904 } 19f582d2684e47 Kairui Song 2023-11-20 905 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki