[jolsa-perf:bpf/tracing_multi_4 33/34] kernel/trace/ftrace.c:5267: warning: expecting prototype for ftrace_find_direct_func(). Prototype was for ftrace_find_direct_func_list() instead

From: kernel test robot
Date: Thu Jul 28 2022 - 01:50:59 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/tracing_multi_4
head: 1637b6b5bec11596e52cdc0a6eadfa45a15276c3
commit: f593767b216bc743e441c394e560546dcaaacc05 [33/34] ftrace: Factor list functions for ftrace_direct_func find and alloc
config: riscv-randconfig-r042-20220728 (https://download.01.org/0day-ci/archive/20220728/202207281352.OqEbh6Vq-lkp@xxxxxxxxx/config)
compiler: riscv64-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://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id=f593767b216bc743e441c394e560546dcaaacc05
git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
git fetch --no-tags jolsa-perf bpf/tracing_multi_4
git checkout f593767b216bc743e441c394e560546dcaaacc05
# 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=riscv SHELL=/bin/bash kernel/trace/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

kernel/trace/ftrace.c:5267: warning: Function parameter or member 'list' not described in 'ftrace_find_direct_func_list'
>> kernel/trace/ftrace.c:5267: warning: expecting prototype for ftrace_find_direct_func(). Prototype was for ftrace_find_direct_func_list() instead
kernel/trace/ftrace.c:5876: warning: Function parameter or member 'addr' not described in 'unregister_ftrace_direct_multi'
kernel/trace/ftrace.c:6017: warning: Function parameter or member 'ops' not described in 'ftrace_set_filter_ip'
kernel/trace/ftrace.c:6017: warning: Function parameter or member 'ip' not described in 'ftrace_set_filter_ip'
kernel/trace/ftrace.c:6017: warning: Function parameter or member 'remove' not described in 'ftrace_set_filter_ip'
kernel/trace/ftrace.c:6017: warning: Function parameter or member 'reset' not described in 'ftrace_set_filter_ip'
kernel/trace/ftrace.c:6036: warning: Function parameter or member 'ops' not described in 'ftrace_set_filter_ips'
kernel/trace/ftrace.c:6036: warning: Function parameter or member 'ips' not described in 'ftrace_set_filter_ips'
kernel/trace/ftrace.c:6036: warning: Function parameter or member 'cnt' not described in 'ftrace_set_filter_ips'
kernel/trace/ftrace.c:6036: warning: Function parameter or member 'remove' not described in 'ftrace_set_filter_ips'
kernel/trace/ftrace.c:6036: warning: Function parameter or member 'reset' not described in 'ftrace_set_filter_ips'
kernel/trace/ftrace.c:6050: warning: Function parameter or member 'ops' not described in 'ftrace_ops_set_global_filter'
kernel/trace/ftrace.c:6078: warning: Function parameter or member 'ops' not described in 'ftrace_set_filter'
kernel/trace/ftrace.c:6078: warning: Function parameter or member 'buf' not described in 'ftrace_set_filter'
kernel/trace/ftrace.c:6078: warning: Function parameter or member 'len' not described in 'ftrace_set_filter'
kernel/trace/ftrace.c:6078: warning: Function parameter or member 'reset' not described in 'ftrace_set_filter'
kernel/trace/ftrace.c:6097: warning: Function parameter or member 'ops' not described in 'ftrace_set_notrace'
kernel/trace/ftrace.c:6097: warning: Function parameter or member 'buf' not described in 'ftrace_set_notrace'
kernel/trace/ftrace.c:6097: warning: Function parameter or member 'len' not described in 'ftrace_set_notrace'
kernel/trace/ftrace.c:6097: warning: Function parameter or member 'reset' not described in 'ftrace_set_notrace'
kernel/trace/ftrace.c:6112: warning: Function parameter or member 'buf' not described in 'ftrace_set_global_filter'
kernel/trace/ftrace.c:6112: warning: Function parameter or member 'len' not described in 'ftrace_set_global_filter'
kernel/trace/ftrace.c:6112: warning: Function parameter or member 'reset' not described in 'ftrace_set_global_filter'
kernel/trace/ftrace.c:6128: warning: Function parameter or member 'buf' not described in 'ftrace_set_global_notrace'
kernel/trace/ftrace.c:6128: warning: Function parameter or member 'len' not described in 'ftrace_set_global_notrace'
kernel/trace/ftrace.c:6128: warning: Function parameter or member 'reset' not described in 'ftrace_set_global_notrace'


vim +5267 kernel/trace/ftrace.c

577d904d31d059 Jiri Olsa 2022-07-27 5251
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5252) /**
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5253) * ftrace_find_direct_func - test an address if it is a registered direct caller
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5254) * @addr: The address of a registered direct caller
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5255) *
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5256) * This searches to see if a ftrace direct caller has been registered
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5257) * at a specific address, and if so, it returns a descriptor for it.
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5258) *
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5259) * This can be used by architecture code to see if an address is
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5260) * a direct caller (trampoline) attached to a fentry/mcount location.
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5261) * This is useful for the function_graph tracer, as it may need to
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5262) * do adjustments if it traced a location that also has a direct
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5263) * trampoline attached to it.
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5264) */
f593767b216bc7 Jiri Olsa 2022-07-27 5265 struct ftrace_direct_func *
f593767b216bc7 Jiri Olsa 2022-07-27 5266 ftrace_find_direct_func_list(struct ftrace_direct_list *list, unsigned long addr)
013bf0da047481 Steven Rostedt (VMware 2019-11-08 @5267) {
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5268) struct ftrace_direct_func *entry;
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5269) bool found = false;
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5270)
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5271) /* May be called by fgraph trampoline (protected by rcu tasks) */
f593767b216bc7 Jiri Olsa 2022-07-27 5272 list_for_each_entry_rcu(entry, &list->funcs, next) {
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5273) if (entry->addr == addr) {
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5274) found = true;
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5275) break;
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5276) }
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5277) }
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5278) if (found)
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5279) return entry;
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5280)
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5281) return NULL;
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5282) }
013bf0da047481 Steven Rostedt (VMware 2019-11-08 5283)

:::::: The code at line 5267 was first introduced by commit
:::::: 013bf0da0474816f57739daa006c8564ad7396a3 ftrace: Add ftrace_find_direct_func()

:::::: TO: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
:::::: CC: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://01.org/lkp