From: Jiri Olsa <jolsa@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: kernel test robot <lkp@intel.com>,
llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org
Subject: Re: [rostedt-trace:for-next 58/100] samples/ftrace/ftrace-direct-multi.c:8:6: warning: no previous prototype for function 'my_direct_func'
Date: Mon, 1 Nov 2021 15:42:57 +0100 [thread overview]
Message-ID: <YX/88QsleYGkt7PG@krava> (raw)
In-Reply-To: <20211101102434.47e84754@gandalf.local.home>
On Mon, Nov 01, 2021 at 10:24:34AM -0400, Steven Rostedt wrote:
> On Mon, 1 Nov 2021 14:37:08 +0100
> Jiri Olsa <jolsa@redhat.com> wrote:
>
> > > If you fix the issue, kindly add following tag as appropriate
> > > Reported-by: kernel test robot <lkp@intel.com>
> > >
> > > All warnings (new ones prefixed by >>):
> > >
> > > >> 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)
> > > ^
> > > samples/ftrace/ftrace-direct-multi.c:8:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> > > void my_direct_func(unsigned long ip)
> >
> > hum, that can actually be static.. I'll check
> >
>
> I'm not sure it can, because you call it from inline assembly, and the
> symbol may not be passed to the assembler.
yes, I just found that.. I actually could not add any input/output
arguments to asm, got a compilation error.. I think it's because
it's used outside any function
>
> It may work with some options, but may not for all.
>
> I think the best thing to do is just create a prototype to quiet the
> warning (with a comment).
ok, I'll send it.. should be on top of you for-next branch?
thanks,
jirka
next prev parent reply other threads:[~2021-11-01 14:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-31 21:46 [rostedt-trace:for-next 58/100] samples/ftrace/ftrace-direct-multi.c:8:6: warning: no previous prototype for function 'my_direct_func' kernel test robot
2021-11-01 13:37 ` Jiri Olsa
2021-11-01 14:24 ` Steven Rostedt
2021-11-01 14:42 ` Jiri Olsa [this message]
2021-11-01 15:09 ` Steven Rostedt
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=YX/88QsleYGkt7PG@krava \
--to=jolsa@redhat.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox