Hi Zhang, kernel test robot noticed the following build warnings: [auto build test WARNING on next-20231103] url: https://github.com/intel-lab-lkp/linux/commits/Zhang-Xiaoxu/spi-mockup-Add-SPI-controller-testing-driver/20231104-144859 base: next-20231103 patch link: https://lore.kernel.org/r/20231104064650.972687-3-zhangxiaoxu%40huaweicloud.com patch subject: [PATCH v3 -next 2/5] spi: mockup: Add writeable tracepoint for spi transfer config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20231104/202311041721.m13CvbG0-lkp@xxxxxxxxx/config) compiler: m68k-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231104/202311041721.m13CvbG0-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202311041721.m13CvbG0-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): 2221 | rcu_assign_pointer(event->tp_event->prog_array, new_array); | ^~ include/asm-generic/rwonce.h:55:27: note: in definition of macro '__WRITE_ONCE' 55 | *(volatile typeof(x) *)&(x) = (val); \ | ^ include/asm-generic/barrier.h:198:9: note: in expansion of macro 'WRITE_ONCE' 198 | WRITE_ONCE(*p, v); \ | ^~~~~~~~~~ include/linux/rcupdate.h:500:17: note: in expansion of macro 'smp_store_release' 500 | smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \ | ^~~~~~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2221:17: note: in expansion of macro 'rcu_assign_pointer' 2221 | rcu_assign_pointer(event->tp_event->prog_array, new_array); | ^~~~~~~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2221:41: error: 'struct perf_event' has no member named 'tp_event' 2221 | rcu_assign_pointer(event->tp_event->prog_array, new_array); | ^~ include/asm-generic/rwonce.h:55:34: note: in definition of macro '__WRITE_ONCE' 55 | *(volatile typeof(x) *)&(x) = (val); \ | ^ include/asm-generic/barrier.h:198:9: note: in expansion of macro 'WRITE_ONCE' 198 | WRITE_ONCE(*p, v); \ | ^~~~~~~~~~ include/linux/rcupdate.h:500:17: note: in expansion of macro 'smp_store_release' 500 | smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \ | ^~~~~~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2221:17: note: in expansion of macro 'rcu_assign_pointer' 2221 | rcu_assign_pointer(event->tp_event->prog_array, new_array); | ^~~~~~~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2221:41: error: 'struct perf_event' has no member named 'tp_event' 2221 | rcu_assign_pointer(event->tp_event->prog_array, new_array); | ^~ include/asm-generic/rwonce.h:55:40: note: in definition of macro '__WRITE_ONCE' 55 | *(volatile typeof(x) *)&(x) = (val); \ | ^~~ include/asm-generic/barrier.h:198:9: note: in expansion of macro 'WRITE_ONCE' 198 | WRITE_ONCE(*p, v); \ | ^~~~~~~~~~ include/linux/rcupdate.h:500:17: note: in expansion of macro 'smp_store_release' 500 | smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \ | ^~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:500:39: note: in expansion of macro 'RCU_INITIALIZER' 500 | smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \ | ^~~~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2221:17: note: in expansion of macro 'rcu_assign_pointer' 2221 | rcu_assign_pointer(event->tp_event->prog_array, new_array); | ^~~~~~~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2221:41: error: 'struct perf_event' has no member named 'tp_event' 2221 | rcu_assign_pointer(event->tp_event->prog_array, new_array); | ^~ include/asm-generic/rwonce.h:55:40: note: in definition of macro '__WRITE_ONCE' 55 | *(volatile typeof(x) *)&(x) = (val); \ | ^~~ include/asm-generic/barrier.h:198:9: note: in expansion of macro 'WRITE_ONCE' 198 | WRITE_ONCE(*p, v); \ | ^~~~~~~~~~ include/linux/rcupdate.h:500:17: note: in expansion of macro 'smp_store_release' 500 | smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \ | ^~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:500:39: note: in expansion of macro 'RCU_INITIALIZER' 500 | smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \ | ^~~~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2221:17: note: in expansion of macro 'rcu_assign_pointer' 2221 | rcu_assign_pointer(event->tp_event->prog_array, new_array); | ^~~~~~~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2225:27: error: 'struct perf_event' has no member named 'prog' 2225 | bpf_prog_put(event->prog); | ^~ kernel/trace/bpf_trace.c:2226:14: error: 'struct perf_event' has no member named 'prog' 2226 | event->prog = NULL; | ^~ kernel/trace/bpf_trace.c: In function 'perf_event_query_prog_array': kernel/trace/bpf_trace.c:2242:18: error: 'struct perf_event' has no member named 'attr' 2242 | if (event->attr.type != PERF_TYPE_TRACEPOINT) | ^~ kernel/trace/bpf_trace.c:2261:48: error: 'struct perf_event' has no member named 'tp_event' 2261 | progs = bpf_event_rcu_dereference(event->tp_event->prog_array); | ^~ include/linux/rcupdate.h:445:19: note: in definition of macro '__rcu_dereference_protected' 445 | ((typeof(*p) __force __kernel *)(p)); \ | ^ kernel/trace/bpf_trace.c:42:9: note: in expansion of macro 'rcu_dereference_protected' 42 | rcu_dereference_protected(p, lockdep_is_held(&bpf_event_mutex)) | ^~~~~~~~~~~~~~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2261:17: note: in expansion of macro 'bpf_event_rcu_dereference' 2261 | progs = bpf_event_rcu_dereference(event->tp_event->prog_array); | ^~~~~~~~~~~~~~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2261:48: error: 'struct perf_event' has no member named 'tp_event' 2261 | progs = bpf_event_rcu_dereference(event->tp_event->prog_array); | ^~ include/linux/rcupdate.h:445:42: note: in definition of macro '__rcu_dereference_protected' 445 | ((typeof(*p) __force __kernel *)(p)); \ | ^ kernel/trace/bpf_trace.c:42:9: note: in expansion of macro 'rcu_dereference_protected' 42 | rcu_dereference_protected(p, lockdep_is_held(&bpf_event_mutex)) | ^~~~~~~~~~~~~~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2261:17: note: in expansion of macro 'bpf_event_rcu_dereference' 2261 | progs = bpf_event_rcu_dereference(event->tp_event->prog_array); | ^~~~~~~~~~~~~~~~~~~~~~~~~ kernel/trace/bpf_trace.c: At top level: >> kernel/trace/bpf_trace.c:2337:14: warning: no previous prototype for 'bpf_trace_run1' [-Wmissing-prototypes] 2337 | void bpf_trace_run##x(struct bpf_prog *prog, \ | ^~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2345:1: note: in expansion of macro 'BPF_TRACE_DEFN_x' 2345 | BPF_TRACE_DEFN_x(1); | ^~~~~~~~~~~~~~~~ >> kernel/trace/bpf_trace.c:2337:14: warning: no previous prototype for 'bpf_trace_run2' [-Wmissing-prototypes] 2337 | void bpf_trace_run##x(struct bpf_prog *prog, \ | ^~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2346:1: note: in expansion of macro 'BPF_TRACE_DEFN_x' 2346 | BPF_TRACE_DEFN_x(2); | ^~~~~~~~~~~~~~~~ >> kernel/trace/bpf_trace.c:2337:14: warning: no previous prototype for 'bpf_trace_run3' [-Wmissing-prototypes] 2337 | void bpf_trace_run##x(struct bpf_prog *prog, \ | ^~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2347:1: note: in expansion of macro 'BPF_TRACE_DEFN_x' 2347 | BPF_TRACE_DEFN_x(3); | ^~~~~~~~~~~~~~~~ >> kernel/trace/bpf_trace.c:2337:14: warning: no previous prototype for 'bpf_trace_run4' [-Wmissing-prototypes] 2337 | void bpf_trace_run##x(struct bpf_prog *prog, \ | ^~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2348:1: note: in expansion of macro 'BPF_TRACE_DEFN_x' 2348 | BPF_TRACE_DEFN_x(4); | ^~~~~~~~~~~~~~~~ >> kernel/trace/bpf_trace.c:2337:14: warning: no previous prototype for 'bpf_trace_run5' [-Wmissing-prototypes] 2337 | void bpf_trace_run##x(struct bpf_prog *prog, \ | ^~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2349:1: note: in expansion of macro 'BPF_TRACE_DEFN_x' 2349 | BPF_TRACE_DEFN_x(5); | ^~~~~~~~~~~~~~~~ >> kernel/trace/bpf_trace.c:2337:14: warning: no previous prototype for 'bpf_trace_run6' [-Wmissing-prototypes] 2337 | void bpf_trace_run##x(struct bpf_prog *prog, \ | ^~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2350:1: note: in expansion of macro 'BPF_TRACE_DEFN_x' 2350 | BPF_TRACE_DEFN_x(6); | ^~~~~~~~~~~~~~~~ >> kernel/trace/bpf_trace.c:2337:14: warning: no previous prototype for 'bpf_trace_run7' [-Wmissing-prototypes] 2337 | void bpf_trace_run##x(struct bpf_prog *prog, \ | ^~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2351:1: note: in expansion of macro 'BPF_TRACE_DEFN_x' 2351 | BPF_TRACE_DEFN_x(7); | ^~~~~~~~~~~~~~~~ >> kernel/trace/bpf_trace.c:2337:14: warning: no previous prototype for 'bpf_trace_run8' [-Wmissing-prototypes] 2337 | void bpf_trace_run##x(struct bpf_prog *prog, \ | ^~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2352:1: note: in expansion of macro 'BPF_TRACE_DEFN_x' 2352 | BPF_TRACE_DEFN_x(8); | ^~~~~~~~~~~~~~~~ >> kernel/trace/bpf_trace.c:2337:14: warning: no previous prototype for 'bpf_trace_run9' [-Wmissing-prototypes] 2337 | void bpf_trace_run##x(struct bpf_prog *prog, \ | ^~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2353:1: note: in expansion of macro 'BPF_TRACE_DEFN_x' 2353 | BPF_TRACE_DEFN_x(9); | ^~~~~~~~~~~~~~~~ >> kernel/trace/bpf_trace.c:2337:14: warning: no previous prototype for 'bpf_trace_run10' [-Wmissing-prototypes] 2337 | void bpf_trace_run##x(struct bpf_prog *prog, \ | ^~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2354:1: note: in expansion of macro 'BPF_TRACE_DEFN_x' 2354 | BPF_TRACE_DEFN_x(10); | ^~~~~~~~~~~~~~~~ >> kernel/trace/bpf_trace.c:2337:14: warning: no previous prototype for 'bpf_trace_run11' [-Wmissing-prototypes] 2337 | void bpf_trace_run##x(struct bpf_prog *prog, \ | ^~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2355:1: note: in expansion of macro 'BPF_TRACE_DEFN_x' 2355 | BPF_TRACE_DEFN_x(11); | ^~~~~~~~~~~~~~~~ >> kernel/trace/bpf_trace.c:2337:14: warning: no previous prototype for 'bpf_trace_run12' [-Wmissing-prototypes] 2337 | void bpf_trace_run##x(struct bpf_prog *prog, \ | ^~~~~~~~~~~~~ kernel/trace/bpf_trace.c:2356:1: note: in expansion of macro 'BPF_TRACE_DEFN_x' 2356 | BPF_TRACE_DEFN_x(12); | ^~~~~~~~~~~~~~~~ kernel/trace/bpf_trace.c: In function 'bpf_get_perf_event_info': kernel/trace/bpf_trace.c:2395:21: error: 'const struct perf_event' has no member named 'prog' 2395 | prog = event->prog; | ^~ kernel/trace/bpf_trace.c:2404:22: error: 'const struct perf_event' has no member named 'tp_event' 2404 | flags = event->tp_event->flags; | ^~ kernel/trace/bpf_trace.c:2406:53: error: 'const struct perf_event' has no member named 'tp_event' 2406 | is_syscall_tp = is_syscall_trace_event(event->tp_event); | ^~ kernel/trace/bpf_trace.c:2409:45: error: 'const struct perf_event' has no member named 'tp_event' 2409 | *buf = is_tracepoint ? event->tp_event->tp->name | ^~ kernel/trace/bpf_trace.c:2410:45: error: 'const struct perf_event' has no member named 'tp_event' 2410 | : event->tp_event->name; | ^~ kernel/trace/bpf_trace.c: In function '____bpf_get_attach_cookie_pe': >> kernel/trace/bpf_trace.c:1155:1: warning: control reaches end of non-void function [-Wreturn-type] 1155 | } | ^ cc1: some warnings being treated as errors Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for BPF_EVENTS Depends on [n]: FTRACE [=n] && BPF_SYSCALL [=y] && (KPROBE_EVENTS [=n] || UPROBE_EVENTS [=n]) && PERF_EVENTS [=n] Selected by [y]: - SPI_MOCKUP [=y] && SPI [=y] && SPI_MASTER [=y] && OF [=y] vim +/bpf_trace_run1 +2337 kernel/trace/bpf_trace.c c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2335 c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2336 #define BPF_TRACE_DEFN_x(x) \ c4f6699dfcb855 Alexei Starovoitov 2018-03-28 @2337 void bpf_trace_run##x(struct bpf_prog *prog, \ c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2338 REPEAT(x, SARG, __DL_COM, __SEQ_0_11)) \ c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2339 { \ c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2340 u64 args[x]; \ c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2341 REPEAT(x, COPY, __DL_SEM, __SEQ_0_11); \ c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2342 __bpf_trace_run(prog, args); \ c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2343 } \ c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2344 EXPORT_SYMBOL_GPL(bpf_trace_run##x) c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2345 BPF_TRACE_DEFN_x(1); c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2346 BPF_TRACE_DEFN_x(2); c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2347 BPF_TRACE_DEFN_x(3); c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2348 BPF_TRACE_DEFN_x(4); c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2349 BPF_TRACE_DEFN_x(5); c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2350 BPF_TRACE_DEFN_x(6); c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2351 BPF_TRACE_DEFN_x(7); c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2352 BPF_TRACE_DEFN_x(8); c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2353 BPF_TRACE_DEFN_x(9); c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2354 BPF_TRACE_DEFN_x(10); c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2355 BPF_TRACE_DEFN_x(11); c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2356 BPF_TRACE_DEFN_x(12); c4f6699dfcb855 Alexei Starovoitov 2018-03-28 2357 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki