Hi Huacai, I love your patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v6.0-rc2 next-20220823] [cannot apply to soc/for-next] [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/Huacai-Chen/LoongArch-Use-TLB-for-ioremap/20220823-110829 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 072e51356cd5a4a1c12c1020bc054c99b98333df config: loongarch-buildonly-randconfig-r001-20220823 (https://download.01.org/0day-ci/archive/20220824/202208240804.stCUUthX-lkp@xxxxxxxxx/config) compiler: loongarch64-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/80f55a8feb23743d963d113c803bf54b1287244d git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Huacai-Chen/LoongArch-Use-TLB-for-ioremap/20220823-110829 git checkout 80f55a8feb23743d963d113c803bf54b1287244d # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch SHELL=/bin/bash arch/loongarch/kernel/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): In file included from include/asm-generic/io.h:1048, from arch/loongarch/include/asm/io.h:94, from arch/loongarch/include/asm/pgtable.h:62, from arch/loongarch/include/asm/uaccess.h:17, from include/linux/uaccess.h:11, from include/linux/sched/task.h:11, from include/linux/sched/signal.h:9, from include/linux/ptrace.h:7, from arch/loongarch/kernel/cpu-probe.c:9: include/linux/pgtable.h: In function 'pte_offset_kernel': include/linux/pgtable.h:92:25: error: implicit declaration of function 'pmd_page_vaddr'; did you mean 'pgd_page_vaddr'? [-Werror=implicit-function-declaration] 92 | return (pte_t *)pmd_page_vaddr(*pmd) + pte_index(address); | ^~~~~~~~~~~~~~ | pgd_page_vaddr >> include/linux/pgtable.h:92:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 92 | return (pte_t *)pmd_page_vaddr(*pmd) + pte_index(address); | ^ include/linux/pgtable.h: In function 'virt_to_kpte': include/linux/pgtable.h:165:16: error: implicit declaration of function 'pmd_none'; did you mean 'pud_none'? [-Werror=implicit-function-declaration] 165 | return pmd_none(*pmd) ? NULL : pte_offset_kernel(pmd, vaddr); | ^~~~~~~~ | pud_none include/linux/pgtable.h: In function 'ptep_test_and_clear_young': include/linux/pgtable.h:207:14: error: implicit declaration of function 'pte_young' [-Werror=implicit-function-declaration] 207 | if (!pte_young(pte)) | ^~~~~~~~~ include/linux/pgtable.h:210:17: error: implicit declaration of function 'set_pte_at' [-Werror=implicit-function-declaration] 210 | set_pte_at(vma->vm_mm, address, ptep, pte_mkold(pte)); | ^~~~~~~~~~ include/linux/pgtable.h:210:55: error: implicit declaration of function 'pte_mkold' [-Werror=implicit-function-declaration] 210 | set_pte_at(vma->vm_mm, address, ptep, pte_mkold(pte)); | ^~~~~~~~~ include/linux/pgtable.h: In function 'ptep_get_and_clear': include/linux/pgtable.h:269:9: error: implicit declaration of function 'pte_clear'; did you mean 'pud_clear'? [-Werror=implicit-function-declaration] 269 | pte_clear(mm, address, ptep); | ^~~~~~~~~ | pud_clear include/linux/pgtable.h: In function 'ptep_set_wrprotect': include/linux/pgtable.h:455:39: error: implicit declaration of function 'pte_wrprotect'; did you mean 'ptep_set_wrprotect'? [-Werror=implicit-function-declaration] 455 | set_pte_at(mm, address, ptep, pte_wrprotect(old_pte)); | ^~~~~~~~~~~~~ | ptep_set_wrprotect In file included from include/linux/init.h:5, from arch/loongarch/kernel/cpu-probe.c:7: include/linux/pgtable.h: In function 'pmd_none_or_clear_bad': include/linux/pgtable.h:877:22: error: implicit declaration of function 'pmd_bad'; did you mean 'pud_bad'? [-Werror=implicit-function-declaration] 877 | if (unlikely(pmd_bad(*pmd))) { | ^~~~~~~ include/linux/compiler.h:78:45: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ include/linux/pgtable.h: In function 'pmd_none_or_trans_huge_or_clear_bad': include/linux/pgtable.h:1384:67: error: implicit declaration of function 'pmd_present'; did you mean 'pud_present'? [-Werror=implicit-function-declaration] 1384 | (IS_ENABLED(CONFIG_ARCH_ENABLE_THP_MIGRATION) && !pmd_present(pmdval))) | ^~~~~~~~~~~ | pud_present arch/loongarch/include/asm/pgtable.h: At top level: arch/loongarch/include/asm/pgtable.h:199:19: error: static declaration of 'pmd_none' follows non-static declaration 199 | static inline int pmd_none(pmd_t pmd) | ^~~~~~~~ include/linux/pgtable.h:165:16: note: previous implicit declaration of 'pmd_none' with type 'int()' 165 | return pmd_none(*pmd) ? NULL : pte_offset_kernel(pmd, vaddr); | ^~~~~~~~ arch/loongarch/include/asm/pgtable.h:204:19: error: static declaration of 'pmd_bad' follows non-static declaration 204 | static inline int pmd_bad(pmd_t pmd) | ^~~~~~~ include/linux/pgtable.h:877:22: note: previous implicit declaration of 'pmd_bad' with type 'int()' 877 | if (unlikely(pmd_bad(*pmd))) { | ^~~~~~~ include/linux/compiler.h:78:45: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ arch/loongarch/include/asm/pgtable.h:209:19: error: static declaration of 'pmd_present' follows non-static declaration 209 | static inline int pmd_present(pmd_t pmd) | ^~~~~~~~~~~ include/linux/pgtable.h:1384:67: note: previous implicit declaration of 'pmd_present' with type 'int()' 1384 | (IS_ENABLED(CONFIG_ARCH_ENABLE_THP_MIGRATION) && !pmd_present(pmdval))) | ^~~~~~~~~~~ arch/loongarch/include/asm/pgtable.h:303:20: warning: conflicting types for 'set_pte_at'; have 'void(struct mm_struct *, long unsigned int, pte_t *, pte_t)' 303 | static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | ^~~~~~~~~~ arch/loongarch/include/asm/pgtable.h:303:20: error: static declaration of 'set_pte_at' follows non-static declaration include/linux/pgtable.h:210:17: note: previous implicit declaration of 'set_pte_at' with type 'void(struct mm_struct *, long unsigned int, pte_t *, pte_t)' 210 | set_pte_at(vma->vm_mm, address, ptep, pte_mkold(pte)); | ^~~~~~~~~~ arch/loongarch/include/asm/pgtable.h:309:20: warning: conflicting types for 'pte_clear'; have 'void(struct mm_struct *, long unsigned int, pte_t *)' 309 | static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | ^~~~~~~~~ arch/loongarch/include/asm/pgtable.h:309:20: error: static declaration of 'pte_clear' follows non-static declaration include/linux/pgtable.h:269:9: note: previous implicit declaration of 'pte_clear' with type 'void(struct mm_struct *, long unsigned int, pte_t *)' 269 | pte_clear(mm, address, ptep); | ^~~~~~~~~ arch/loongarch/include/asm/pgtable.h:330:19: error: static declaration of 'pte_young' follows non-static declaration 330 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | ^~~~~~~~~ include/linux/pgtable.h:207:14: note: previous implicit declaration of 'pte_young' with type 'int()' 207 | if (!pte_young(pte)) | ^~~~~~~~~ arch/loongarch/include/asm/pgtable.h:333:21: error: conflicting types for 'pte_mkold'; have 'pte_t(pte_t)' 333 | static inline pte_t pte_mkold(pte_t pte) | ^~~~~~~~~ include/linux/pgtable.h:210:55: note: previous implicit declaration of 'pte_mkold' with type 'int()' 210 | set_pte_at(vma->vm_mm, address, ptep, pte_mkold(pte)); | ^~~~~~~~~ arch/loongarch/include/asm/pgtable.h:363:21: error: conflicting types for 'pte_wrprotect'; have 'pte_t(pte_t)' 363 | static inline pte_t pte_wrprotect(pte_t pte) | ^~~~~~~~~~~~~ include/linux/pgtable.h:455:39: note: previous implicit declaration of 'pte_wrprotect' with type 'int()' 455 | set_pte_at(mm, address, ptep, pte_wrprotect(old_pte)); | ^~~~~~~~~~~~~ arch/loongarch/include/asm/pgtable.h:382: warning: "pte_accessible" redefined 382 | #define pte_accessible pte_accessible | include/linux/pgtable.h:780: note: this is the location of the previous definition 780 | # define pte_accessible(mm, pte) ((void)(pte), 1) -- In file included from include/asm-generic/io.h:1048, from arch/loongarch/include/asm/io.h:94, from arch/loongarch/include/asm/pgtable.h:62, from arch/loongarch/include/asm/uaccess.h:17, from include/linux/uaccess.h:11, from include/linux/sched/task.h:11, from include/linux/sched/signal.h:9, from include/linux/ptrace.h:7, from include/linux/entry-common.h:6, from arch/loongarch/kernel/traps.c:10: include/linux/pgtable.h: In function 'pte_offset_kernel': include/linux/pgtable.h:92:25: error: implicit declaration of function 'pmd_page_vaddr'; did you mean 'pgd_page_vaddr'? [-Werror=implicit-function-declaration] 92 | return (pte_t *)pmd_page_vaddr(*pmd) + pte_index(address); | ^~~~~~~~~~~~~~ | pgd_page_vaddr >> include/linux/pgtable.h:92:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 92 | return (pte_t *)pmd_page_vaddr(*pmd) + pte_index(address); | ^ include/linux/pgtable.h: In function 'virt_to_kpte': include/linux/pgtable.h:165:16: error: implicit declaration of function 'pmd_none'; did you mean 'pud_none'? [-Werror=implicit-function-declaration] 165 | return pmd_none(*pmd) ? NULL : pte_offset_kernel(pmd, vaddr); | ^~~~~~~~ | pud_none include/linux/pgtable.h: In function 'ptep_test_and_clear_young': include/linux/pgtable.h:207:14: error: implicit declaration of function 'pte_young' [-Werror=implicit-function-declaration] 207 | if (!pte_young(pte)) | ^~~~~~~~~ include/linux/pgtable.h:210:17: error: implicit declaration of function 'set_pte_at' [-Werror=implicit-function-declaration] 210 | set_pte_at(vma->vm_mm, address, ptep, pte_mkold(pte)); | ^~~~~~~~~~ include/linux/pgtable.h:210:55: error: implicit declaration of function 'pte_mkold' [-Werror=implicit-function-declaration] 210 | set_pte_at(vma->vm_mm, address, ptep, pte_mkold(pte)); | ^~~~~~~~~ include/linux/pgtable.h: In function 'ptep_get_and_clear': include/linux/pgtable.h:269:9: error: implicit declaration of function 'pte_clear'; did you mean 'pud_clear'? [-Werror=implicit-function-declaration] 269 | pte_clear(mm, address, ptep); | ^~~~~~~~~ | pud_clear include/linux/pgtable.h: In function 'ptep_set_wrprotect': include/linux/pgtable.h:455:39: error: implicit declaration of function 'pte_wrprotect'; did you mean 'ptep_set_wrprotect'? [-Werror=implicit-function-declaration] 455 | set_pte_at(mm, address, ptep, pte_wrprotect(old_pte)); | ^~~~~~~~~~~~~ | ptep_set_wrprotect In file included from include/linux/build_bug.h:5, from include/linux/bits.h:22, from include/linux/bitops.h:6, from arch/loongarch/kernel/traps.c:6: include/linux/pgtable.h: In function 'pmd_none_or_clear_bad': include/linux/pgtable.h:877:22: error: implicit declaration of function 'pmd_bad'; did you mean 'pud_bad'? [-Werror=implicit-function-declaration] 877 | if (unlikely(pmd_bad(*pmd))) { | ^~~~~~~ include/linux/compiler.h:78:45: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ include/linux/pgtable.h: In function 'pmd_none_or_trans_huge_or_clear_bad': include/linux/pgtable.h:1384:67: error: implicit declaration of function 'pmd_present'; did you mean 'pud_present'? [-Werror=implicit-function-declaration] 1384 | (IS_ENABLED(CONFIG_ARCH_ENABLE_THP_MIGRATION) && !pmd_present(pmdval))) | ^~~~~~~~~~~ | pud_present arch/loongarch/include/asm/pgtable.h: At top level: arch/loongarch/include/asm/pgtable.h:199:19: error: static declaration of 'pmd_none' follows non-static declaration 199 | static inline int pmd_none(pmd_t pmd) | ^~~~~~~~ include/linux/pgtable.h:165:16: note: previous implicit declaration of 'pmd_none' with type 'int()' 165 | return pmd_none(*pmd) ? NULL : pte_offset_kernel(pmd, vaddr); | ^~~~~~~~ arch/loongarch/include/asm/pgtable.h:204:19: error: static declaration of 'pmd_bad' follows non-static declaration 204 | static inline int pmd_bad(pmd_t pmd) | ^~~~~~~ include/linux/pgtable.h:877:22: note: previous implicit declaration of 'pmd_bad' with type 'int()' 877 | if (unlikely(pmd_bad(*pmd))) { | ^~~~~~~ include/linux/compiler.h:78:45: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ arch/loongarch/include/asm/pgtable.h:209:19: error: static declaration of 'pmd_present' follows non-static declaration 209 | static inline int pmd_present(pmd_t pmd) | ^~~~~~~~~~~ include/linux/pgtable.h:1384:67: note: previous implicit declaration of 'pmd_present' with type 'int()' 1384 | (IS_ENABLED(CONFIG_ARCH_ENABLE_THP_MIGRATION) && !pmd_present(pmdval))) | ^~~~~~~~~~~ arch/loongarch/include/asm/pgtable.h:303:20: warning: conflicting types for 'set_pte_at'; have 'void(struct mm_struct *, long unsigned int, pte_t *, pte_t)' 303 | static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | ^~~~~~~~~~ arch/loongarch/include/asm/pgtable.h:303:20: error: static declaration of 'set_pte_at' follows non-static declaration include/linux/pgtable.h:210:17: note: previous implicit declaration of 'set_pte_at' with type 'void(struct mm_struct *, long unsigned int, pte_t *, pte_t)' 210 | set_pte_at(vma->vm_mm, address, ptep, pte_mkold(pte)); | ^~~~~~~~~~ arch/loongarch/include/asm/pgtable.h:309:20: warning: conflicting types for 'pte_clear'; have 'void(struct mm_struct *, long unsigned int, pte_t *)' 309 | static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | ^~~~~~~~~ arch/loongarch/include/asm/pgtable.h:309:20: error: static declaration of 'pte_clear' follows non-static declaration include/linux/pgtable.h:269:9: note: previous implicit declaration of 'pte_clear' with type 'void(struct mm_struct *, long unsigned int, pte_t *)' 269 | pte_clear(mm, address, ptep); | ^~~~~~~~~ arch/loongarch/include/asm/pgtable.h:330:19: error: static declaration of 'pte_young' follows non-static declaration 330 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | ^~~~~~~~~ include/linux/pgtable.h:207:14: note: previous implicit declaration of 'pte_young' with type 'int()' 207 | if (!pte_young(pte)) | ^~~~~~~~~ arch/loongarch/include/asm/pgtable.h:333:21: error: conflicting types for 'pte_mkold'; have 'pte_t(pte_t)' 333 | static inline pte_t pte_mkold(pte_t pte) | ^~~~~~~~~ include/linux/pgtable.h:210:55: note: previous implicit declaration of 'pte_mkold' with type 'int()' 210 | set_pte_at(vma->vm_mm, address, ptep, pte_mkold(pte)); | ^~~~~~~~~ arch/loongarch/include/asm/pgtable.h:363:21: error: conflicting types for 'pte_wrprotect'; have 'pte_t(pte_t)' 363 | static inline pte_t pte_wrprotect(pte_t pte) | ^~~~~~~~~~~~~ include/linux/pgtable.h:455:39: note: previous implicit declaration of 'pte_wrprotect' with type 'int()' 455 | set_pte_at(mm, address, ptep, pte_wrprotect(old_pte)); | ^~~~~~~~~~~~~ arch/loongarch/include/asm/pgtable.h:382: warning: "pte_accessible" redefined 382 | #define pte_accessible pte_accessible | -- In file included from include/asm-generic/io.h:1048, from arch/loongarch/include/asm/io.h:94, from arch/loongarch/include/asm/pgtable.h:62, from arch/loongarch/include/asm/uaccess.h:17, from include/linux/uaccess.h:11, from include/linux/sched/task.h:11, from include/linux/sched/signal.h:9, from include/linux/rcuwait.h:6, from include/linux/percpu-rwsem.h:7, from include/linux/fs.h:33, from arch/loongarch/include/asm/elf.h:9, from include/linux/elf.h:6, from include/linux/module.h:19, from include/linux/device/driver.h:21, from include/linux/device.h:32, from include/linux/acpi.h:15, from arch/loongarch/kernel/irq.c:6: include/linux/pgtable.h: In function 'pte_offset_kernel': include/linux/pgtable.h:92:25: error: implicit declaration of function 'pmd_page_vaddr'; did you mean 'pgd_page_vaddr'? [-Werror=implicit-function-declaration] 92 | return (pte_t *)pmd_page_vaddr(*pmd) + pte_index(address); | ^~~~~~~~~~~~~~ | pgd_page_vaddr >> include/linux/pgtable.h:92:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 92 | return (pte_t *)pmd_page_vaddr(*pmd) + pte_index(address); | ^ include/linux/pgtable.h: In function 'virt_to_kpte': include/linux/pgtable.h:165:16: error: implicit declaration of function 'pmd_none'; did you mean 'pud_none'? [-Werror=implicit-function-declaration] 165 | return pmd_none(*pmd) ? NULL : pte_offset_kernel(pmd, vaddr); | ^~~~~~~~ | pud_none include/linux/pgtable.h: In function 'ptep_test_and_clear_young': include/linux/pgtable.h:207:14: error: implicit declaration of function 'pte_young' [-Werror=implicit-function-declaration] 207 | if (!pte_young(pte)) | ^~~~~~~~~ include/linux/pgtable.h:210:17: error: implicit declaration of function 'set_pte_at' [-Werror=implicit-function-declaration] 210 | set_pte_at(vma->vm_mm, address, ptep, pte_mkold(pte)); | ^~~~~~~~~~ include/linux/pgtable.h:210:55: error: implicit declaration of function 'pte_mkold' [-Werror=implicit-function-declaration] 210 | set_pte_at(vma->vm_mm, address, ptep, pte_mkold(pte)); | ^~~~~~~~~ include/linux/pgtable.h: In function 'ptep_get_and_clear': include/linux/pgtable.h:269:9: error: implicit declaration of function 'pte_clear'; did you mean 'pud_clear'? [-Werror=implicit-function-declaration] 269 | pte_clear(mm, address, ptep); | ^~~~~~~~~ | pud_clear include/linux/pgtable.h: In function 'ptep_set_wrprotect': include/linux/pgtable.h:455:39: error: implicit declaration of function 'pte_wrprotect'; did you mean 'ptep_set_wrprotect'? [-Werror=implicit-function-declaration] 455 | set_pte_at(mm, address, ptep, pte_wrprotect(old_pte)); | ^~~~~~~~~~~~~ | ptep_set_wrprotect In file included from include/linux/kernel.h:20, from arch/loongarch/kernel/irq.c:5: include/linux/pgtable.h: In function 'pmd_none_or_clear_bad': include/linux/pgtable.h:877:22: error: implicit declaration of function 'pmd_bad'; did you mean 'pud_bad'? [-Werror=implicit-function-declaration] 877 | if (unlikely(pmd_bad(*pmd))) { | ^~~~~~~ include/linux/compiler.h:78:45: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ include/linux/pgtable.h: In function 'pmd_none_or_trans_huge_or_clear_bad': include/linux/pgtable.h:1384:67: error: implicit declaration of function 'pmd_present'; did you mean 'pud_present'? [-Werror=implicit-function-declaration] 1384 | (IS_ENABLED(CONFIG_ARCH_ENABLE_THP_MIGRATION) && !pmd_present(pmdval))) | ^~~~~~~~~~~ | pud_present arch/loongarch/include/asm/pgtable.h: At top level: arch/loongarch/include/asm/pgtable.h:199:19: error: static declaration of 'pmd_none' follows non-static declaration 199 | static inline int pmd_none(pmd_t pmd) | ^~~~~~~~ include/linux/pgtable.h:165:16: note: previous implicit declaration of 'pmd_none' with type 'int()' 165 | return pmd_none(*pmd) ? NULL : pte_offset_kernel(pmd, vaddr); | ^~~~~~~~ arch/loongarch/include/asm/pgtable.h:204:19: error: static declaration of 'pmd_bad' follows non-static declaration 204 | static inline int pmd_bad(pmd_t pmd) | ^~~~~~~ include/linux/pgtable.h:877:22: note: previous implicit declaration of 'pmd_bad' with type 'int()' 877 | if (unlikely(pmd_bad(*pmd))) { | ^~~~~~~ include/linux/compiler.h:78:45: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ arch/loongarch/include/asm/pgtable.h:209:19: error: static declaration of 'pmd_present' follows non-static declaration 209 | static inline int pmd_present(pmd_t pmd) | ^~~~~~~~~~~ include/linux/pgtable.h:1384:67: note: previous implicit declaration of 'pmd_present' with type 'int()' 1384 | (IS_ENABLED(CONFIG_ARCH_ENABLE_THP_MIGRATION) && !pmd_present(pmdval))) | ^~~~~~~~~~~ arch/loongarch/include/asm/pgtable.h:303:20: warning: conflicting types for 'set_pte_at'; have 'void(struct mm_struct *, long unsigned int, pte_t *, pte_t)' 303 | static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | ^~~~~~~~~~ arch/loongarch/include/asm/pgtable.h:303:20: error: static declaration of 'set_pte_at' follows non-static declaration include/linux/pgtable.h:210:17: note: previous implicit declaration of 'set_pte_at' with type 'void(struct mm_struct *, long unsigned int, pte_t *, pte_t)' 210 | set_pte_at(vma->vm_mm, address, ptep, pte_mkold(pte)); | ^~~~~~~~~~ arch/loongarch/include/asm/pgtable.h:309:20: warning: conflicting types for 'pte_clear'; have 'void(struct mm_struct *, long unsigned int, pte_t *)' 309 | static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | ^~~~~~~~~ arch/loongarch/include/asm/pgtable.h:309:20: error: static declaration of 'pte_clear' follows non-static declaration include/linux/pgtable.h:269:9: note: previous implicit declaration of 'pte_clear' with type 'void(struct mm_struct *, long unsigned int, pte_t *)' 269 | pte_clear(mm, address, ptep); | ^~~~~~~~~ arch/loongarch/include/asm/pgtable.h:330:19: error: static declaration of 'pte_young' follows non-static declaration 330 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | ^~~~~~~~~ include/linux/pgtable.h:207:14: note: previous implicit declaration of 'pte_young' with type 'int()' 207 | if (!pte_young(pte)) | ^~~~~~~~~ arch/loongarch/include/asm/pgtable.h:333:21: error: conflicting types for 'pte_mkold'; have 'pte_t(pte_t)' 333 | static inline pte_t pte_mkold(pte_t pte) | ^~~~~~~~~ include/linux/pgtable.h:210:55: note: previous implicit declaration of 'pte_mkold' with type 'int()' 210 | set_pte_at(vma->vm_mm, address, ptep, pte_mkold(pte)); | ^~~~~~~~~ arch/loongarch/include/asm/pgtable.h:363:21: error: conflicting types for 'pte_wrprotect'; have 'pte_t(pte_t)' 363 | static inline pte_t pte_wrprotect(pte_t pte) | ^~~~~~~~~~~~~ include/linux/pgtable.h:455:39: note: previous implicit declaration of 'pte_wrprotect' with type 'int()' 455 | set_pte_at(mm, address, ptep, pte_wrprotect(old_pte)); | ^~~~~~~~~~~~~ arch/loongarch/include/asm/pgtable.h:382: warning: "pte_accessible" redefined 382 | #define pte_accessible pte_accessible | include/linux/pgtable.h:780: note: this is the location of the previous definition 780 | # define pte_accessible(mm, pte) ((void)(pte), 1) .. vim +92 include/linux/pgtable.h 974b9b2c68f3d3 Mike Rapoport 2020-06-08 88 974b9b2c68f3d3 Mike Rapoport 2020-06-08 89 #ifndef pte_offset_kernel 974b9b2c68f3d3 Mike Rapoport 2020-06-08 90 static inline pte_t *pte_offset_kernel(pmd_t *pmd, unsigned long address) 974b9b2c68f3d3 Mike Rapoport 2020-06-08 91 { 974b9b2c68f3d3 Mike Rapoport 2020-06-08 @92 return (pte_t *)pmd_page_vaddr(*pmd) + pte_index(address); 974b9b2c68f3d3 Mike Rapoport 2020-06-08 93 } 974b9b2c68f3d3 Mike Rapoport 2020-06-08 94 #define pte_offset_kernel pte_offset_kernel 974b9b2c68f3d3 Mike Rapoport 2020-06-08 95 #endif 974b9b2c68f3d3 Mike Rapoport 2020-06-08 96 -- 0-DAY CI Kernel Test Service https://01.org/lkp