[jolsa-perf:bpf/tracing_multi_4 33/34] kernel/trace/ftrace.c:5266:1: warning: no previous prototype for 'ftrace_find_direct_func_list'

From: kernel test robot
Date: Thu Jul 28 2022 - 00:49:55 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: s390-randconfig-r044-20220728 (https://download.01.org/0day-ci/archive/20220728/202207281208.EogzobID-lkp@xxxxxxxxx/config)
compiler: s390-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=s390 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:295:5: warning: no previous prototype for '__register_ftrace_function' [-Wmissing-prototypes]
295 | int __register_ftrace_function(struct ftrace_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:338:5: warning: no previous prototype for '__unregister_ftrace_function' [-Wmissing-prototypes]
338 | int __unregister_ftrace_function(struct ftrace_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:4051:15: warning: no previous prototype for 'arch_ftrace_match_adjust' [-Wmissing-prototypes]
4051 | char * __weak arch_ftrace_match_adjust(char *str, const char *search)
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/trace/ftrace.c:5266:1: warning: no previous prototype for 'ftrace_find_direct_func_list' [-Wmissing-prototypes]
5266 | ftrace_find_direct_func_list(struct ftrace_direct_list *list, unsigned long addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/ftrace_find_direct_func_list +5266 kernel/trace/ftrace.c

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

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