Hi Nicholas, I love your patch! Yet something to improve: [auto build test ERROR on openrisc/for-next] [also build test ERROR on sparc-next/master sparc/master linus/master asm-generic/master xtensa/for_next v5.8-rc7 next-20200728] [cannot apply to nios2/for-linus] [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] url: https://github.com/0day-ci/linux/commits/Nicholas-Piggin/Use-asm-generic-for-mmu_context-no-op-functions/20200728-113854 base: https://github.com/openrisc/linux.git for-next config: sh-allmodconfig (attached as .config) compiler: sh4-linux-gcc (GCC) 9.3.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 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All error/warnings (new ones prefixed by >>): In file included from include/asm-generic/nommu_context.h:11, from arch/sh/include/asm/mmu_context.h:137, from arch/sh/kernel/process_32.c:26: include/asm-generic/mmu_context.h: In function 'activate_mm': include/asm-generic/mmu_context.h:59:2: error: implicit declaration of function 'switch_mm' [-Werror=implicit-function-declaration] 59 | switch_mm(prev_mm, next_mm, current); | ^~~~~~~~~ In file included from arch/sh/include/asm/mmu_context.h:137, from arch/sh/kernel/process_32.c:26: include/asm-generic/nommu_context.h: At top level: include/asm-generic/nommu_context.h:13:20: error: conflicting types for 'switch_mm' [-Werror] 13 | static inline void switch_mm(struct mm_struct *prev, | ^~~~~~~~~ >> include/asm-generic/nommu_context.h:13:20: error: static declaration of 'switch_mm' follows non-static declaration In file included from include/asm-generic/nommu_context.h:11, from arch/sh/include/asm/mmu_context.h:137, from arch/sh/kernel/process_32.c:26: include/asm-generic/mmu_context.h:59:2: note: previous implicit declaration of 'switch_mm' was here 59 | switch_mm(prev_mm, next_mm, current); | ^~~~~~~~~ cc1: all warnings being treated as errors -- In file included from include/asm-generic/nommu_context.h:11, from arch/sh/include/asm/mmu_context.h:137, from arch/sh/kernel/setup.c:44: include/asm-generic/mmu_context.h: In function 'activate_mm': include/asm-generic/mmu_context.h:59:2: error: implicit declaration of function 'switch_mm' [-Werror=implicit-function-declaration] 59 | switch_mm(prev_mm, next_mm, current); | ^~~~~~~~~ In file included from arch/sh/include/asm/mmu_context.h:137, from arch/sh/kernel/setup.c:44: include/asm-generic/nommu_context.h: At top level: include/asm-generic/nommu_context.h:13:20: error: conflicting types for 'switch_mm' [-Werror] 13 | static inline void switch_mm(struct mm_struct *prev, | ^~~~~~~~~ >> include/asm-generic/nommu_context.h:13:20: error: static declaration of 'switch_mm' follows non-static declaration In file included from include/asm-generic/nommu_context.h:11, from arch/sh/include/asm/mmu_context.h:137, from arch/sh/kernel/setup.c:44: include/asm-generic/mmu_context.h:59:2: note: previous implicit declaration of 'switch_mm' was here 59 | switch_mm(prev_mm, next_mm, current); | ^~~~~~~~~ arch/sh/kernel/setup.c:248:12: error: no previous prototype for 'sh_fdt_init' [-Werror=missing-prototypes] 248 | void __ref sh_fdt_init(phys_addr_t dt_phys) | ^~~~~~~~~~~ cc1: all warnings being treated as errors -- In file included from include/asm-generic/nommu_context.h:11, from arch/sh/include/asm/mmu_context.h:137, from arch/sh/kernel/hw_breakpoint.c:21: include/asm-generic/mmu_context.h: In function 'activate_mm': include/asm-generic/mmu_context.h:59:2: error: implicit declaration of function 'switch_mm' [-Werror=implicit-function-declaration] 59 | switch_mm(prev_mm, next_mm, current); | ^~~~~~~~~ In file included from arch/sh/include/asm/mmu_context.h:137, from arch/sh/kernel/hw_breakpoint.c:21: include/asm-generic/nommu_context.h: At top level: include/asm-generic/nommu_context.h:13:20: error: conflicting types for 'switch_mm' [-Werror] 13 | static inline void switch_mm(struct mm_struct *prev, | ^~~~~~~~~ >> include/asm-generic/nommu_context.h:13:20: error: static declaration of 'switch_mm' follows non-static declaration In file included from include/asm-generic/nommu_context.h:11, from arch/sh/include/asm/mmu_context.h:137, from arch/sh/kernel/hw_breakpoint.c:21: include/asm-generic/mmu_context.h:59:2: note: previous implicit declaration of 'switch_mm' was here 59 | switch_mm(prev_mm, next_mm, current); | ^~~~~~~~~ arch/sh/kernel/hw_breakpoint.c:135:5: error: no previous prototype for 'arch_bp_generic_fields' [-Werror=missing-prototypes] 135 | int arch_bp_generic_fields(int sh_len, int sh_type, | ^~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors -- In file included from include/asm-generic/nommu_context.h:11, from arch/sh/include/asm/mmu_context.h:137, from arch/sh/kernel/cpu/init.c:14: include/asm-generic/mmu_context.h: In function 'activate_mm': include/asm-generic/mmu_context.h:59:2: error: implicit declaration of function 'switch_mm' [-Werror=implicit-function-declaration] 59 | switch_mm(prev_mm, next_mm, current); | ^~~~~~~~~ In file included from arch/sh/include/asm/mmu_context.h:137, from arch/sh/kernel/cpu/init.c:14: include/asm-generic/nommu_context.h: At top level: >> include/asm-generic/nommu_context.h:13:20: warning: conflicting types for 'switch_mm' 13 | static inline void switch_mm(struct mm_struct *prev, | ^~~~~~~~~ >> include/asm-generic/nommu_context.h:13:20: error: static declaration of 'switch_mm' follows non-static declaration In file included from include/asm-generic/nommu_context.h:11, from arch/sh/include/asm/mmu_context.h:137, from arch/sh/kernel/cpu/init.c:14: include/asm-generic/mmu_context.h:59:2: note: previous implicit declaration of 'switch_mm' was here 59 | switch_mm(prev_mm, next_mm, current); | ^~~~~~~~~ arch/sh/kernel/cpu/init.c:99:29: warning: no previous prototype for 'l2_cache_init' [-Wmissing-prototypes] 99 | void __attribute__ ((weak)) l2_cache_init(void) | ^~~~~~~~~~~~~ cc1: some warnings being treated as errors -- In file included from include/asm-generic/nommu_context.h:11, from arch/sh/include/asm/mmu_context.h:137, from kernel/fork.c:101: include/asm-generic/mmu_context.h: In function 'activate_mm': include/asm-generic/mmu_context.h:59:2: error: implicit declaration of function 'switch_mm' [-Werror=implicit-function-declaration] 59 | switch_mm(prev_mm, next_mm, current); | ^~~~~~~~~ In file included from arch/sh/include/asm/mmu_context.h:137, from kernel/fork.c:101: include/asm-generic/nommu_context.h: At top level: >> include/asm-generic/nommu_context.h:13:20: warning: conflicting types for 'switch_mm' 13 | static inline void switch_mm(struct mm_struct *prev, | ^~~~~~~~~ >> include/asm-generic/nommu_context.h:13:20: error: static declaration of 'switch_mm' follows non-static declaration In file included from include/asm-generic/nommu_context.h:11, from arch/sh/include/asm/mmu_context.h:137, from kernel/fork.c:101: include/asm-generic/mmu_context.h:59:2: note: previous implicit declaration of 'switch_mm' was here 59 | switch_mm(prev_mm, next_mm, current); | ^~~~~~~~~ cc1: some warnings being treated as errors -- In file included from include/asm-generic/nommu_context.h:11, from arch/sh/include/asm/mmu_context.h:137, from kernel/exit.c:69: include/asm-generic/mmu_context.h: In function 'activate_mm': include/asm-generic/mmu_context.h:59:2: error: implicit declaration of function 'switch_mm' [-Werror=implicit-function-declaration] 59 | switch_mm(prev_mm, next_mm, current); | ^~~~~~~~~ In file included from arch/sh/include/asm/mmu_context.h:137, from kernel/exit.c:69: include/asm-generic/nommu_context.h: At top level: >> include/asm-generic/nommu_context.h:13:20: warning: conflicting types for 'switch_mm' 13 | static inline void switch_mm(struct mm_struct *prev, | ^~~~~~~~~ >> include/asm-generic/nommu_context.h:13:20: error: static declaration of 'switch_mm' follows non-static declaration In file included from include/asm-generic/nommu_context.h:11, from arch/sh/include/asm/mmu_context.h:137, from kernel/exit.c:69: include/asm-generic/mmu_context.h:59:2: note: previous implicit declaration of 'switch_mm' was here 59 | switch_mm(prev_mm, next_mm, current); | ^~~~~~~~~ kernel/exit.c:1714:13: warning: no previous prototype for 'abort' [-Wmissing-prototypes] 1714 | __weak void abort(void) | ^~~~~ cc1: some warnings being treated as errors -- In file included from include/asm-generic/nommu_context.h:11, from arch/sh/include/asm/mmu_context.h:137, from include/linux/mmu_context.h:5, from kernel/sched/sched.h:54, from kernel/sched/rt.c:6: include/asm-generic/mmu_context.h: In function 'activate_mm': include/asm-generic/mmu_context.h:59:2: error: implicit declaration of function 'switch_mm' [-Werror=implicit-function-declaration] 59 | switch_mm(prev_mm, next_mm, current); | ^~~~~~~~~ In file included from arch/sh/include/asm/mmu_context.h:137, from include/linux/mmu_context.h:5, from kernel/sched/sched.h:54, from kernel/sched/rt.c:6: include/asm-generic/nommu_context.h: At top level: >> include/asm-generic/nommu_context.h:13:20: warning: conflicting types for 'switch_mm' 13 | static inline void switch_mm(struct mm_struct *prev, | ^~~~~~~~~ >> include/asm-generic/nommu_context.h:13:20: error: static declaration of 'switch_mm' follows non-static declaration In file included from include/asm-generic/nommu_context.h:11, from arch/sh/include/asm/mmu_context.h:137, from include/linux/mmu_context.h:5, from kernel/sched/sched.h:54, from kernel/sched/rt.c:6: include/asm-generic/mmu_context.h:59:2: note: previous implicit declaration of 'switch_mm' was here 59 | switch_mm(prev_mm, next_mm, current); | ^~~~~~~~~ kernel/sched/rt.c:668:6: warning: no previous prototype for 'sched_rt_bandwidth_account' [-Wmissing-prototypes] 668 | bool sched_rt_bandwidth_account(struct rt_rq *rt_rq) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors -- In file included from include/asm-generic/nommu_context.h:11, from arch/sh/include/asm/mmu_context.h:137, from mm/nommu.c:43: include/asm-generic/mmu_context.h: In function 'activate_mm': include/asm-generic/mmu_context.h:59:2: error: implicit declaration of function 'switch_mm' [-Werror=implicit-function-declaration] 59 | switch_mm(prev_mm, next_mm, current); | ^~~~~~~~~ In file included from arch/sh/include/asm/mmu_context.h:137, from mm/nommu.c:43: include/asm-generic/nommu_context.h: At top level: >> include/asm-generic/nommu_context.h:13:20: warning: conflicting types for 'switch_mm' 13 | static inline void switch_mm(struct mm_struct *prev, | ^~~~~~~~~ >> include/asm-generic/nommu_context.h:13:20: error: static declaration of 'switch_mm' follows non-static declaration In file included from include/asm-generic/nommu_context.h:11, from arch/sh/include/asm/mmu_context.h:137, from mm/nommu.c:43: include/asm-generic/mmu_context.h:59:2: note: previous implicit declaration of 'switch_mm' was here 59 | switch_mm(prev_mm, next_mm, current); | ^~~~~~~~~ mm/nommu.c:1665:15: warning: no previous prototype for 'arch_get_unmapped_area' [-Wmissing-prototypes] 1665 | unsigned long arch_get_unmapped_area(struct file *file, unsigned long addr, | ^~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/switch_mm +13 include/asm-generic/nommu_context.h 12 > 13 static inline void switch_mm(struct mm_struct *prev, 14 struct mm_struct *next, 15 struct task_struct *tsk) 16 { 17 } 18 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip