[jolsa-perf:bpf/batch 7/27] include/linux/ftrace.h:361:5: warning: no previous prototype for function 'modify_ftrace_direct_multi'
From: kernel test robot <hidden>
Date: 2021-08-27 06:26:02
Also in:
lkml, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/batch head: b81b17307e02f8e6d4abf87e7ec2d7e5aea1e0b5 commit: 81a7fb1d152a20b3bdb300bb584c69d620e3c811 [7/27] ftrace: Add multi direct modify interface config: riscv-buildonly-randconfig-r006-20210826 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 1076082a0d97bd5c16a25ee7cf3dbb6ee4b5a9fe) 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 # install riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id=81a7fb1d152a20b3bdb300bb584c69d620e3c811 git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git git fetch --no-tags jolsa-perf bpf/batch git checkout 81a7fb1d152a20b3bdb300bb584c69d620e3c811 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <redacted> All warnings (new ones prefixed by >>): In file included from drivers/gpu/drm/exynos/exynos_drm_drv.c:16: In file included from include/drm/drm_atomic.h:31: In file included from include/drm/drm_crtc.h:31: In file included from include/linux/fb.h:5: In file included from include/linux/kgdb.h:19: In file included from include/linux/kprobes.h:29: include/linux/ftrace.h:353:41: warning: declaration of 'struct ftrace_ops' will not be visible outside of this function [-Wvisibility] int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr) ^ include/linux/ftrace.h:353:5: warning: no previous prototype for function 'register_ftrace_direct_multi' [-Wmissing-prototypes] int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr) ^ include/linux/ftrace.h:353:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr) ^ static include/linux/ftrace.h:357:43: warning: declaration of 'struct ftrace_ops' will not be visible outside of this function [-Wvisibility] int unregister_ftrace_direct_multi(struct ftrace_ops *ops) ^ include/linux/ftrace.h:357:5: warning: no previous prototype for function 'unregister_ftrace_direct_multi' [-Wmissing-prototypes] int unregister_ftrace_direct_multi(struct ftrace_ops *ops) ^ include/linux/ftrace.h:357:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int unregister_ftrace_direct_multi(struct ftrace_ops *ops) ^ static include/linux/ftrace.h:361:39: warning: declaration of 'struct ftrace_ops' will not be visible outside of this function [-Wvisibility] int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr) ^
quoted
include/linux/ftrace.h:361:5: warning: no previous prototype for function 'modify_ftrace_direct_multi' [-Wmissing-prototypes]
int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
^
include/linux/ftrace.h:361:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
^
static
6 warnings generated.
vim +/modify_ftrace_direct_multi +361 include/linux/ftrace.h
322
323 #else
324 # define ftrace_direct_func_count 0
325 static inline int register_ftrace_direct(unsigned long ip, unsigned long addr)
326 {
327 return -ENOTSUPP;
328 }
329 static inline int unregister_ftrace_direct(unsigned long ip, unsigned long addr)
330 {
331 return -ENOTSUPP;
332 }
333 static inline int modify_ftrace_direct(unsigned long ip,
334 unsigned long old_addr, unsigned long new_addr)
335 {
336 return -ENOTSUPP;
337 }
338 static inline struct ftrace_direct_func *ftrace_find_direct_func(unsigned long addr)
339 {
340 return NULL;
341 }
342 static inline int ftrace_modify_direct_caller(struct ftrace_func_entry *entry,
343 struct dyn_ftrace *rec,
344 unsigned long old_addr,
345 unsigned long new_addr)
346 {
347 return -ENODEV;
348 }
349 static inline unsigned long ftrace_find_rec_direct(unsigned long ip)
350 {
351 return 0;
352 }
353 int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
354 {
355 return -ENODEV;
356 }
357 int unregister_ftrace_direct_multi(struct ftrace_ops *ops)
358 {
359 return -ENODEV;
360 }
> 361 int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
362 {
363 return -ENODEV;
364 }
365 #endif /* CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS */
366
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Attachments
- .config.gz [application/gzip] 35762 bytes