lkml.org 
[lkml]   [2021]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [rostedt-trace:for-next 58/100] samples/ftrace/ftrace-direct-multi.c:8:6: warning: no previous prototype for function 'my_direct_func'
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.

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).

-- Steve

\
 
 \ /
  Last update: 2021-11-01 15:24    [W:1.854 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site