Skip to content

Commit 67d4f6e

Browse files
Jiri Olsarostedt
authored andcommitted
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: 5fae941 ("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>
1 parent 4e9f63c commit 67d4f6e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

samples/ftrace/ftrace-direct-multi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#include <linux/ftrace.h>
66
#include <linux/sched/stat.h>
77

8+
extern void my_direct_func(unsigned long ip);
9+
810
void my_direct_func(unsigned long ip)
911
{
1012
trace_printk("ip %lx\n", ip);

0 commit comments

Comments
 (0)