Messages in this thread | | | Date | Fri, 15 Oct 2021 12:06:47 +0800 | From | kernel test robot <> | Subject | [gustavoars:for-next/cast-function 3/4] kernel/trace/ftrace.c:7029:6: error: conflicting types for 'arch_ftrace_ops_list_func' |
| |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git for-next/cast-function head: 21078041965eb5a2e83d296690a93243611a3c27 commit: c45ede6c27819bb038af313b475fdf50ce755dd6 [3/4] ftrace: Fix -Wmissing-prototypes errors config: i386-randconfig-r001-20211014 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/commit/?id=c45ede6c27819bb038af313b475fdf50ce755dd6 git remote add gustavoars https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git git fetch --no-tags gustavoars for-next/cast-function git checkout c45ede6c27819bb038af313b475fdf50ce755dd6 # save the attached .config to linux build tree mkdir build_dir make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from kernel/trace/ftrace.c:29: include/linux/ftrace.h:49:41: warning: 'struct ftrace_regs' declared inside parameter list will not be visible outside of this definition or declaration 49 | struct ftrace_ops *op, struct ftrace_regs *fregs); | ^~~~~~~~~~~ kernel/trace/ftrace.c:297:5: warning: no previous prototype for '__register_ftrace_function' [-Wmissing-prototypes] 297 | int __register_ftrace_function(struct ftrace_ops *ops) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/trace/ftrace.c:340:5: warning: no previous prototype for '__unregister_ftrace_function' [-Wmissing-prototypes] 340 | int __unregister_ftrace_function(struct ftrace_ops *ops) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/trace/ftrace.c:579:5: warning: no previous prototype for 'ftrace_profile_pages_init' [-Wmissing-prototypes] 579 | int ftrace_profile_pages_init(struct ftrace_profile_stat *stat) | ^~~~~~~~~~~~~~~~~~~~~~~~~ kernel/trace/ftrace.c:3871:15: warning: no previous prototype for 'arch_ftrace_match_adjust' [-Wmissing-prototypes] 3871 | char * __weak arch_ftrace_match_adjust(char *str, const char *search) | ^~~~~~~~~~~~~~~~~~~~~~~~ >> kernel/trace/ftrace.c:7029:6: error: conflicting types for 'arch_ftrace_ops_list_func' 7029 | void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip, | ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from kernel/trace/ftrace.c:29: include/linux/ftrace.h:48:6: note: previous declaration of 'arch_ftrace_ops_list_func' was here 48 | void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip, | ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/arch_ftrace_ops_list_func +7029 kernel/trace/ftrace.c
b848914ce39589 Steven Rostedt 2011-05-04 7011 2f5f6ad9390c1e Steven Rostedt 2011-08-08 7012 /* 2f5f6ad9390c1e Steven Rostedt 2011-08-08 7013 * Some archs only support passing ip and parent_ip. Even though 2f5f6ad9390c1e Steven Rostedt 2011-08-08 7014 * the list function ignores the op parameter, we do not want any 2f5f6ad9390c1e Steven Rostedt 2011-08-08 7015 * C side effects, where a function is called without the caller 2f5f6ad9390c1e Steven Rostedt 2011-08-08 7016 * sending a third parameter. a1e2e31d175a13 Steven Rostedt 2011-08-09 7017 * Archs are to support both the regs and ftrace_ops at the same time. a1e2e31d175a13 Steven Rostedt 2011-08-09 7018 * If they support ftrace_ops, it is assumed they support regs. a1e2e31d175a13 Steven Rostedt 2011-08-09 7019 * If call backs want to use regs, they must either check for regs 06aeaaeabf69da Masami Hiramatsu 2012-09-28 7020 * being NULL, or CONFIG_DYNAMIC_FTRACE_WITH_REGS. 06aeaaeabf69da Masami Hiramatsu 2012-09-28 7021 * Note, CONFIG_DYNAMIC_FTRACE_WITH_REGS expects a full regs to be saved. a1e2e31d175a13 Steven Rostedt 2011-08-09 7022 * An architecture can pass partial regs with ftrace_ops and still b8ec330a63eb39 Li Bin 2015-11-30 7023 * set the ARCH_SUPPORTS_FTRACE_OPS. 1bdc308cabc872 Gustavo A. R. Silva 2021-10-13 7024 * 1bdc308cabc872 Gustavo A. R. Silva 2021-10-13 7025 * In vmlinux.lds.h, ftrace_ops_list_func() is defined to be 1bdc308cabc872 Gustavo A. R. Silva 2021-10-13 7026 * arch_ftrace_ops_list_func. 2f5f6ad9390c1e Steven Rostedt 2011-08-08 7027 */ 2f5f6ad9390c1e Steven Rostedt 2011-08-08 7028 #if ARCH_SUPPORTS_FTRACE_OPS 1bdc308cabc872 Gustavo A. R. Silva 2021-10-13 @7029 void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip, d19ad0775dcd64 Steven Rostedt (VMware 2020-10-28 7030) struct ftrace_ops *op, struct ftrace_regs *fregs) 2f5f6ad9390c1e Steven Rostedt 2011-08-08 7031 { d19ad0775dcd64 Steven Rostedt (VMware 2020-10-28 7032) __ftrace_ops_list_func(ip, parent_ip, NULL, fregs); 2f5f6ad9390c1e Steven Rostedt 2011-08-08 7033 } 2f5f6ad9390c1e Steven Rostedt 2011-08-08 7034 #else 1bdc308cabc872 Gustavo A. R. Silva 2021-10-13 7035 void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip) 2f5f6ad9390c1e Steven Rostedt 2011-08-08 7036 { a1e2e31d175a13 Steven Rostedt 2011-08-09 7037 __ftrace_ops_list_func(ip, parent_ip, NULL, NULL); 2f5f6ad9390c1e Steven Rostedt 2011-08-08 7038 } 2f5f6ad9390c1e Steven Rostedt 2011-08-08 7039 #endif 1bdc308cabc872 Gustavo A. R. Silva 2021-10-13 7040 NOKPROBE_SYMBOL(arch_ftrace_ops_list_func); 2f5f6ad9390c1e Steven Rostedt 2011-08-08 7041
:::::: The code at line 7029 was first introduced by commit :::::: 1bdc308cabc872d3f6998ba8af9b1e3bc88cea64 ftrace: Fix -Wcast-function-type warnings on powerpc64
:::::: TO: Gustavo A. R. Silva <gustavoars@kernel.org> :::::: CC: Gustavo A. R. Silva <gustavoars@kernel.org>
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [unhandled content-type:application/gzip] | |