mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [mingo-tip:sched/headers 2150/2579] kernel/trace/trace_hwlat.c:175:6: warning: no previous prototype for function 'trace_hwlat_callback'
@ 2022-04-21 14:37 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-04-21 14:37 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: llvm, kbuild-all, linux-kernel

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head:   49e1ec6c70a6eb4b7de9250a455b8b63eb42afbe
commit: b0a0ce86322929677661f28bec305c68815c387d [2150/2579] headers/deps: Remove <linux/hardirq.h> inclusions from headers that don't need it anymore
config: i386-randconfig-a013 (https://download.01.org/0day-ci/archive/20220421/202204212231.wBlI8L8G-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project bac6cd5bf85669e3376610cfc4c4f9ca015e7b9b)
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/mingo/tip.git/commit/?id=b0a0ce86322929677661f28bec305c68815c387d
        git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
        git fetch --no-tags mingo-tip sched/headers
        git checkout b0a0ce86322929677661f28bec305c68815c387d
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/crypto/ arch/x86/entry/vdso/ arch/x86/events/amd/ arch/x86/kernel/ arch/x86/pci/ kernel/bpf/ kernel/trace/

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

>> kernel/trace/trace_hwlat.c:175:6: warning: no previous prototype for function 'trace_hwlat_callback' [-Wmissing-prototypes]
   void trace_hwlat_callback(bool enter)
        ^
   kernel/trace/trace_hwlat.c:175:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void trace_hwlat_callback(bool enter)
   ^
   static 
   1 warning generated.


vim +/trace_hwlat_callback +175 kernel/trace/trace_hwlat.c

e7c15cd8a11333 Steven Rostedt (Red Hat    2016-06-23  174) 
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04 @175) void trace_hwlat_callback(bool enter)
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  176) {
f46b16520a087e Daniel Bristot de Oliveira 2021-06-22  177  	struct hwlat_kthread_data *kdata = get_cpu_data();
f46b16520a087e Daniel Bristot de Oliveira 2021-06-22  178  
f46b16520a087e Daniel Bristot de Oliveira 2021-06-22  179  	if (!kdata->kthread)
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  180) 		return;
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  181) 
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  182) 	/*
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  183) 	 * Currently trace_clock_local() calls sched_clock() and the
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  184) 	 * generic version is not NMI safe.
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  185) 	 */
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  186) 	if (!IS_ENABLED(CONFIG_GENERIC_SCHED_CLOCK)) {
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  187) 		if (enter)
f46b16520a087e Daniel Bristot de Oliveira 2021-06-22  188  			kdata->nmi_ts_start = time_get();
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  189) 		else
f46b16520a087e Daniel Bristot de Oliveira 2021-06-22  190  			kdata->nmi_total_ts += time_get() - kdata->nmi_ts_start;
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  191) 	}
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  192) 
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  193) 	if (enter)
f46b16520a087e Daniel Bristot de Oliveira 2021-06-22  194  		kdata->nmi_count++;
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  195) }
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  196) 

:::::: The code at line 175 was first introduced by commit
:::::: 7b2c86250122de316cbab8754050622ead04af39 tracing: Add NMI tracing in hwlat detector

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

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

only message in thread, other threads:[~2022-04-21 14:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21 14:37 [mingo-tip:sched/headers 2150/2579] kernel/trace/trace_hwlat.c:175:6: warning: no previous prototype for function 'trace_hwlat_callback' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®