Re: [linux-next:master 10511/10830] mm/internal.h:98:23: error: implicit declaration of function 'pte_mkclean'; did you mean 'page_mkclean'?

Barry Song
2024-02-28T21:52:20Z

> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 20af1ca418d2c0b11bc2a1fe8c0c88f67bcc2a7e
> commit: 9ea89c8b43ac0de34c9542a97eaab901af02e5a8 [10511/10830] mm: make folio_pte_batch available outside of mm/memory.c
> config: riscv-nommu_k210_defconfig (https://download.01.org/0day-ci/archive/20240228/202402282202.yV6GmMJu-lkp@intel.com/config)
> compiler: riscv64-linux-gcc (GCC) 13.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240228/202402282202.yV6GmMJu-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/202402282202.yV6GmMJu-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> In file included from mm/filemap.c:51:
> mm/internal.h: In function '__pte_batch_clear_ignored':
>>> mm/internal.h:98:23: error: implicit declaration of function 'pte_mkclean'; did you mean 'page_mkclean'? [-Werror=implicit-function-declaration]
> 98 | pte = pte_mkclean(pte);
> | ^~~~~~~~~~~
> | page_mkclean
> mm/internal.h:98:23: error: incompatible types when assigning to type 'pte_t' from type 'int'
>>> mm/internal.h:101:16: error: implicit declaration of function 'pte_wrprotect' [-Werror=implicit-function-declaration]
> 101 | return pte_wrprotect(pte_mkold(pte));
> | ^~~~~~~~~~~~~
>>> mm/internal.h:101:30: error: implicit declaration of function 'pte_mkold' [-Werror=implicit-function-declaration]
> 101 | return pte_wrprotect(pte_mkold(pte));

This is exactly the issue SeongJae reported and got fixed here:

https://lkml.kernel.org/r/CAGsJ_4wWzG-37D82vqP_zt+Fcbz+URVe5oXLBc4M5wbN8A_gpQ@mail.gmail.com

Thanks
Barry