From: Jiri Olsa <jolsa@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@redhat.com>
Cc: kernel test robot <lkp@intel.com>, lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] ftrace/samples: Add missing prototype for my_direct_func
Date: Mon, 1 Nov 2021 16:20:02 +0100 [thread overview]
Message-ID: <20211101152002.376369-1-jolsa@kernel.org> (raw)
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.
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>
---
samples/ftrace/ftrace-direct-multi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/samples/ftrace/ftrace-direct-multi.c b/samples/ftrace/ftrace-direct-multi.c
index 2a5b1fb7ac14..e0ccf43da0c9 100644
--- a/samples/ftrace/ftrace-direct-multi.c
+++ b/samples/ftrace/ftrace-direct-multi.c
@@ -10,6 +10,7 @@ void my_direct_func(unsigned long ip)
trace_printk("ip %lx\n", ip);
}
+extern void my_direct_func(unsigned long ip);
extern void my_tramp(void *);
asm (
--
2.32.0
next reply other threads:[~2021-11-01 15:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-01 15:20 Jiri Olsa [this message]
2021-11-01 15:31 ` [PATCH] ftrace/samples: Add missing prototype for my_direct_func Steven Rostedt
2021-11-01 15:39 ` Jiri Olsa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211101152002.376369-1-jolsa@kernel.org \
--to=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.