linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [rostedt-trace:for-next 58/100] samples/ftrace/ftrace-direct-multi.c:8:6: warning: no previous prototype for function 'my_direct_func'
@ 2021-10-31 21:46 kernel test robot
  2021-11-01 13:37 ` Jiri Olsa
  0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2021-10-31 21:46 UTC (permalink / raw)
  To: Jiri Olsa; +Cc: llvm, kbuild-all, linux-kernel, Steven Rostedt (VMware)

[-- Attachment #1: Type: text/plain, Size: 1945 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git for-next
head:   93d76e4a0e0112b320c4f0e2a3930ad634628c58
commit: 5fae941b9a6f95773df644e7cf304bf199707876 [58/100] ftrace/samples: Add multi direct interface test module
config: x86_64-randconfig-r024-20211031 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 82ed106567063ea269c6d5669278b733e173a42f)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git/commit/?id=5fae941b9a6f95773df644e7cf304bf199707876
        git remote add rostedt-trace https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
        git fetch --no-tags rostedt-trace for-next
        git checkout 5fae941b9a6f95773df644e7cf304bf199707876
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

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)
   ^
   static 
   1 warning generated.


vim +/my_direct_func +8 samples/ftrace/ftrace-direct-multi.c

     7	
   > 8	void my_direct_func(unsigned long ip)
     9	{
    10		trace_printk("ip %lx\n", ip);
    11	}
    12	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 38821 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [rostedt-trace:for-next 58/100] samples/ftrace/ftrace-direct-multi.c:8:6: warning: no previous prototype for function 'my_direct_func'
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Jiri Olsa @ 2021-11-01 13:37 UTC (permalink / raw)
  To: kernel test robot; +Cc: llvm, kbuild-all, linux-kernel, Steven Rostedt (VMware)

On Mon, Nov 01, 2021 at 05:46:26AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git for-next
> head:   93d76e4a0e0112b320c4f0e2a3930ad634628c58
> commit: 5fae941b9a6f95773df644e7cf304bf199707876 [58/100] ftrace/samples: Add multi direct interface test module
> config: x86_64-randconfig-r024-20211031 (attached as .config)
> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 82ed106567063ea269c6d5669278b733e173a42f)
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git/commit/?id=5fae941b9a6f95773df644e7cf304bf199707876
>         git remote add rostedt-trace https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
>         git fetch --no-tags rostedt-trace for-next
>         git checkout 5fae941b9a6f95773df644e7cf304bf199707876
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 
> 
> 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

thanks,
jirka

>    ^
>    static 
>    1 warning generated.
> 
> 
> vim +/my_direct_func +8 samples/ftrace/ftrace-direct-multi.c
> 
>      7	
>    > 8	void my_direct_func(unsigned long ip)
>      9	{
>     10		trace_printk("ip %lx\n", ip);
>     11	}
>     12	
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [rostedt-trace:for-next 58/100] samples/ftrace/ftrace-direct-multi.c:8:6: warning: no previous prototype for function 'my_direct_func'
  2021-11-01 13:37 ` Jiri Olsa
@ 2021-11-01 14:24   ` Steven Rostedt
  2021-11-01 14:42     ` Jiri Olsa
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2021-11-01 14:24 UTC (permalink / raw)
  To: Jiri Olsa; +Cc: kernel test robot, llvm, kbuild-all, linux-kernel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [rostedt-trace:for-next 58/100] samples/ftrace/ftrace-direct-multi.c:8:6: warning: no previous prototype for function 'my_direct_func'
  2021-11-01 14:24   ` Steven Rostedt
@ 2021-11-01 14:42     ` Jiri Olsa
  2021-11-01 15:09       ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Jiri Olsa @ 2021-11-01 14:42 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: kernel test robot, llvm, kbuild-all, linux-kernel

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [rostedt-trace:for-next 58/100] samples/ftrace/ftrace-direct-multi.c:8:6: warning: no previous prototype for function 'my_direct_func'
  2021-11-01 14:42     ` Jiri Olsa
@ 2021-11-01 15:09       ` Steven Rostedt
  0 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2021-11-01 15:09 UTC (permalink / raw)
  To: Jiri Olsa; +Cc: kernel test robot, llvm, kbuild-all, linux-kernel

On Mon, 1 Nov 2021 15:42:57 +0100
Jiri Olsa <jolsa@redhat.com> wrote:

> ok, I'll send it.. should be on top of you for-next branch?

Yes please. I'm about to push it to Linus, with a note that I'll be sending
him another pull request later this week.

-- Steve

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-01 15:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-11-01 15:09       ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).