summaryrefslogtreecommitdiffstats
path: root/samples/ftrace
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2021-11-01 16:39:07 +0100
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2021-11-02 01:56:51 +0100
commit67d4f6e3bf5dddced226fbf19704cdbbb0c98847 (patch)
tree4fd82f9c6051b0a2f740941b0419fd43198d7cb6 /samples/ftrace
parenttracing/selftests: Add tests for hist trigger expression parsing (diff)
downloadlinux-67d4f6e3bf5dddced226fbf19704cdbbb0c98847.tar.xz
linux-67d4f6e3bf5dddced226fbf19704cdbbb0c98847.zip
ftrace/samples: Add missing prototype for my_direct_func
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/20211101153907.377668-1-jolsa@kernel.org Reported-by: kernel test robot <lkp@intel.com> Fixes: 5fae941b9a6f ("ftrace/samples: Add multi direct interface test module") Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'samples/ftrace')
-rw-r--r--samples/ftrace/ftrace-direct-multi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/samples/ftrace/ftrace-direct-multi.c b/samples/ftrace/ftrace-direct-multi.c
index 2a5b1fb7ac14..b6d7806b400e 100644
--- a/samples/ftrace/ftrace-direct-multi.c
+++ b/samples/ftrace/ftrace-direct-multi.c
@@ -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);