All of lore.kernel.org
 help / color / mirror / Atom feed
* [trace:ftrace-regs 25/26] kernel/trace/trace_sched_wakeup.c:215:36: warning: declaration of 'struct ftrace_regs' will not be visible outside of this function
@ 2020-11-10  3:55 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-11-10  3:55 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git ftrace-regs
head:   88610b6f216a17265a798caaefa557a8a73338f7
commit: a1fed3f30010663200313fd4d0f36e202a222917 [25/26] ftrace/x86: Allow for arguments to be passed in to ftrace_regs by default
config: x86_64-randconfig-a011-20201109 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 09ec07827b1128504457a93dee80b2ceee1af600)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git/commit/?id=a1fed3f30010663200313fd4d0f36e202a222917
        git remote add trace https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
        git fetch --no-tags trace ftrace-regs
        git checkout a1fed3f30010663200313fd4d0f36e202a222917
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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 >>):

   In file included from kernel/trace/trace_sched_wakeup.c:16:
   include/linux/ftrace.h:102:63: warning: declaration of 'struct ftrace_regs' will not be visible outside of this function [-Wvisibility]
   static __always_inline struct pt_regs *ftrace_get_regs(struct ftrace_regs *fregs)
                                                                 ^
   include/linux/ftrace.h:107:9: error: implicit declaration of function 'arch_ftrace_get_regs' [-Werror,-Wimplicit-function-declaration]
           return arch_ftrace_get_regs(fregs);
                  ^
   include/linux/ftrace.h:107:9: note: did you mean 'ftrace_get_regs'?
   include/linux/ftrace.h:102:40: note: 'ftrace_get_regs' declared here
   static __always_inline struct pt_regs *ftrace_get_regs(struct ftrace_regs *fregs)
                                          ^
   include/linux/ftrace.h:107:9: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct pt_regs *' [-Wint-conversion]
           return arch_ftrace_get_regs(fregs);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/ftrace.h:111:40: warning: declaration of 'struct ftrace_regs' will not be visible outside of this function [-Wvisibility]
                                 struct ftrace_ops *op, struct ftrace_regs *fregs);
                                                               ^
   include/linux/ftrace.h:279:34: warning: declaration of 'struct ftrace_regs' will not be visible outside of this function [-Wvisibility]
                           struct ftrace_ops *op, struct ftrace_regs *fregs);
                                                         ^
>> kernel/trace/trace_sched_wakeup.c:215:36: warning: declaration of 'struct ftrace_regs' will not be visible outside of this function [-Wvisibility]
                      struct ftrace_ops *op, struct ftrace_regs *fregs)
                                                    ^
   kernel/trace/trace_sched_wakeup.c:681:28: error: incompatible function pointer types passing 'void (unsigned long, unsigned long, struct ftrace_ops *, struct ftrace_regs *)' to parameter of type 'ftrace_func_t' (aka 'void (*)(unsigned long, unsigned long, struct ftrace_ops *, struct ftrace_regs *)') [-Werror,-Wincompatible-function-pointer-types]
           ftrace_init_array_ops(tr, wakeup_tracer_call);
                                     ^~~~~~~~~~~~~~~~~~
   kernel/trace/trace.h:975:66: note: passing argument to parameter 'func' here
   void ftrace_init_array_ops(struct trace_array *tr, ftrace_func_t func);
                                                                    ^
   5 warnings and 2 errors generated.

vim +215 kernel/trace/trace_sched_wakeup.c

7495a5beaa22f19 Jiri Olsa               2010-09-23  209  
317e04ca905ac6c Steven Rostedt (VMware  2018-11-28  210) /*
317e04ca905ac6c Steven Rostedt (VMware  2018-11-28  211)  * wakeup uses its own tracer function to keep the overhead down:
317e04ca905ac6c Steven Rostedt (VMware  2018-11-28  212)  */
7495a5beaa22f19 Jiri Olsa               2010-09-23  213  static void
317e04ca905ac6c Steven Rostedt (VMware  2018-11-28  214) wakeup_tracer_call(unsigned long ip, unsigned long parent_ip,
ee600f9e55a1981 Steven Rostedt (VMware  2020-10-28 @215) 		   struct ftrace_ops *op, struct ftrace_regs *fregs)
7495a5beaa22f19 Jiri Olsa               2010-09-23  216  {
317e04ca905ac6c Steven Rostedt (VMware  2018-11-28  217) 	struct trace_array *tr = wakeup_trace;
317e04ca905ac6c Steven Rostedt (VMware  2018-11-28  218) 	struct trace_array_cpu *data;
317e04ca905ac6c Steven Rostedt (VMware  2018-11-28  219) 	unsigned long flags;
317e04ca905ac6c Steven Rostedt (VMware  2018-11-28  220) 	int pc;
317e04ca905ac6c Steven Rostedt (VMware  2018-11-28  221) 
317e04ca905ac6c Steven Rostedt (VMware  2018-11-28  222) 	if (!func_prolog_preempt_disable(tr, &data, &pc))
317e04ca905ac6c Steven Rostedt (VMware  2018-11-28  223) 		return;
317e04ca905ac6c Steven Rostedt (VMware  2018-11-28  224) 
317e04ca905ac6c Steven Rostedt (VMware  2018-11-28  225) 	local_irq_save(flags);
7495a5beaa22f19 Jiri Olsa               2010-09-23  226  	trace_function(tr, ip, parent_ip, flags, pc);
317e04ca905ac6c Steven Rostedt (VMware  2018-11-28  227) 	local_irq_restore(flags);
317e04ca905ac6c Steven Rostedt (VMware  2018-11-28  228) 
317e04ca905ac6c Steven Rostedt (VMware  2018-11-28  229) 	atomic_dec(&data->disabled);
317e04ca905ac6c Steven Rostedt (VMware  2018-11-28  230) 	preempt_enable_notrace();
7495a5beaa22f19 Jiri Olsa               2010-09-23  231  }
7495a5beaa22f19 Jiri Olsa               2010-09-23  232  

:::::: The code at line 215 was first introduced by commit
:::::: ee600f9e55a19811b2e069cd405ea1dd4ea18819 ftrace: Have the callbacks receive a struct ftrace_regs instead of pt_regs

:::::: TO: Steven Rostedt (VMware) <rostedt@goodmis.org>
:::::: CC: Steven Rostedt (VMware) <rostedt@goodmis.org>

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

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-10  3:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-10  3:55 [trace:ftrace-regs 25/26] kernel/trace/trace_sched_wakeup.c:215:36: warning: declaration of 'struct ftrace_regs' will not be visible outside of this function kernel test robot

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.