]> Git Repo - linux.git/commitdiff
ftrace/samples: Add missing prototype for my_direct_func
authorJiri Olsa <[email protected]>
Mon, 1 Nov 2021 15:39:07 +0000 (16:39 +0100)
committerSteven Rostedt (VMware) <[email protected]>
Tue, 2 Nov 2021 00:56:51 +0000 (20:56 -0400)
There's compilation fail reported kernel test robot for W=1 build:

  >> samples/ftrace/ftrace-direct-multi.c:8:6: warning: no previous
  prototype for function 'my_direct_func' [-Wmissing-prototypes]
     void my_direct_func(unsigned long ip)

The inlined assembly is used outside function, so we can't make
my_direct_func static and pass it as asm input argument.

However my_tramp is already extern so I think there's no problem
keeping my_direct_func extern as well and just add its prototype.

Link: https://lkml.kernel.org/r/[email protected]
Reported-by: kernel test robot <[email protected]>
Fixes: 5fae941b9a6f ("ftrace/samples: Add multi direct interface test module")
Signed-off-by: Jiri Olsa <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>
samples/ftrace/ftrace-direct-multi.c

index 2a5b1fb7ac142b89005fdfc5c3ea8f2a719627a6..b6d7806b400e4966212146fe45f844c8be8ba8d9 100644 (file)
@@ -5,6 +5,8 @@
 #include <linux/ftrace.h>
 #include <linux/sched/stat.h>
 
+extern void my_direct_func(unsigned long ip);
+
 void my_direct_func(unsigned long ip)
 {
        trace_printk("ip %lx\n", ip);
This page took 0.04901 seconds and 4 git commands to generate.