Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [jolsa-perf:bpf/tracing_multi_5 10/10] kernel/bpf/trampoline.c:195:19: error: variable has incomplete type 'struct ftrace_ops'
@ 2025-06-20 14:44 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-06-20 14:44 UTC (permalink / raw)
  To: Jiri Olsa; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/tracing_multi_5
head:   b288c6b15d20122d59ddf3bce2fb86afe6ed56c3
commit: b288c6b15d20122d59ddf3bce2fb86afe6ed56c3 [10/10] bpf: Remove ftrace_ops from bpf_trampoline object
config: x86_64-buildonly-randconfig-003-20250620 (https://download.01.org/0day-ci/archive/20250620/202506202232.4jCtsKLX-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250620/202506202232.4jCtsKLX-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506202232.4jCtsKLX-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from kernel/bpf/trampoline.c:6:
   include/linux/ftrace.h:567:5: warning: no previous prototype for function 'register_ftrace_direct_hash' [-Wmissing-prototypes]
     567 | int register_ftrace_direct_hash(struct ftrace_ops *ops, struct ftrace_hash *hash)
         |     ^
   include/linux/ftrace.h:567:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     567 | int register_ftrace_direct_hash(struct ftrace_ops *ops, struct ftrace_hash *hash)
         | ^
         | static 
   include/linux/ftrace.h:572:5: warning: no previous prototype for function 'unregister_ftrace_direct_hash' [-Wmissing-prototypes]
     572 | int unregister_ftrace_direct_hash(struct ftrace_ops *ops, struct ftrace_hash *hash)
         |     ^
   include/linux/ftrace.h:572:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     572 | int unregister_ftrace_direct_hash(struct ftrace_ops *ops, struct ftrace_hash *hash)
         | ^
         | static 
   include/linux/ftrace.h:577:5: warning: no previous prototype for function 'modify_ftrace_direct_hash' [-Wmissing-prototypes]
     577 | int modify_ftrace_direct_hash(struct ftrace_ops *ops, struct ftrace_hash *hash, bool do_direct_lock)
         |     ^
   include/linux/ftrace.h:577:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     577 | int modify_ftrace_direct_hash(struct ftrace_ops *ops, struct ftrace_hash *hash, bool do_direct_lock)
         | ^
         | static 
>> kernel/bpf/trampoline.c:195:19: error: variable has incomplete type 'struct ftrace_ops'
     195 | struct ftrace_ops direct_ops = {
         |                   ^
   include/linux/bpf.h:55:8: note: forward declaration of 'struct ftrace_ops'
      55 | struct ftrace_ops;
         |        ^
   3 warnings and 1 error generated.


vim +195 kernel/bpf/trampoline.c

   194	
 > 195	struct ftrace_ops direct_ops = {
   196	#ifdef CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
   197	       .ops_func = bpf_tramp_ftrace_ops_func,
   198	#endif
   199	};
   200	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-06-20 14:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-20 14:44 [jolsa-perf:bpf/tracing_multi_5 10/10] kernel/bpf/trampoline.c:195:19: error: variable has incomplete type 'struct ftrace_ops' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox