[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202301181934.5KQVprgp-lkp@intel.com>
Date: Wed, 18 Jan 2023 19:39:28 +0800
From: kernel test robot <lkp@...el.com>
To: Wang Jingjin <wangjingjin1@...wei.com>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org,
"Steven Rostedt (Google)" <rostedt@...dmis.org>
Subject: kernel/trace/ftrace.c:3109:19: warning: unused function
'ops_traces_mod'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c1649ec55708ae42091a2f1bca1ab49ecd722d55
commit: 123d6455771ec577ce65f8d1bda548fb0eb7ef21 ftrace: Fix build warning for ops_references_rec() not used
date: 5 months ago
config: mips-buildonly-randconfig-r005-20230115
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 4196ca3278f78c6e19246e54ab0ecb364e37d66a)
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 mips cross compiling tool for clang build
# apt-get install binutils-mipsel-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=123d6455771ec577ce65f8d1bda548fb0eb7ef21
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 123d6455771ec577ce65f8d1bda548fb0eb7ef21
# 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=mips olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash kernel/trace/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
kernel/trace/ftrace.c:299:5: warning: no previous prototype for function '__register_ftrace_function' [-Wmissing-prototypes]
int __register_ftrace_function(struct ftrace_ops *ops)
^
kernel/trace/ftrace.c:299:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __register_ftrace_function(struct ftrace_ops *ops)
^
static
kernel/trace/ftrace.c:342:5: warning: no previous prototype for function '__unregister_ftrace_function' [-Wmissing-prototypes]
int __unregister_ftrace_function(struct ftrace_ops *ops)
^
kernel/trace/ftrace.c:342:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __unregister_ftrace_function(struct ftrace_ops *ops)
^
static
kernel/trace/ftrace.c:3999:15: warning: no previous prototype for function 'arch_ftrace_match_adjust' [-Wmissing-prototypes]
char * __weak arch_ftrace_match_adjust(char *str, const char *search)
^
kernel/trace/ftrace.c:3999:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
char * __weak arch_ftrace_match_adjust(char *str, const char *search)
^
static
>> kernel/trace/ftrace.c:3109:19: warning: unused function 'ops_traces_mod' [-Wunused-function]
static inline int ops_traces_mod(struct ftrace_ops *ops)
^
kernel/trace/ftrace.c:3727:19: warning: unused function 'test_for_valid_rec' [-Wunused-function]
static inline int test_for_valid_rec(struct dyn_ftrace *rec)
^
5 warnings generated.
vim +/ops_traces_mod +3109 kernel/trace/ftrace.c
3d0833953e1b98 Steven Rostedt 2008-05-12 3108
8c4f3c3fa9681d Steven Rostedt (Red Hat 2013-07-30 @3109) static inline int ops_traces_mod(struct ftrace_ops *ops)
f7bc8b61f65726 Steven Rostedt 2011-07-14 3110 {
8c4f3c3fa9681d Steven Rostedt (Red Hat 2013-07-30 3111) /*
8c4f3c3fa9681d Steven Rostedt (Red Hat 2013-07-30 3112) * Filter_hash being empty will default to trace module.
8c4f3c3fa9681d Steven Rostedt (Red Hat 2013-07-30 3113) * But notrace hash requires a test of individual module functions.
8c4f3c3fa9681d Steven Rostedt (Red Hat 2013-07-30 3114) */
33b7f99cf003ca Steven Rostedt (Red Hat 2014-08-15 3115) return ftrace_hash_empty(ops->func_hash->filter_hash) &&
33b7f99cf003ca Steven Rostedt (Red Hat 2014-08-15 3116) ftrace_hash_empty(ops->func_hash->notrace_hash);
8c4f3c3fa9681d Steven Rostedt (Red Hat 2013-07-30 3117) }
f7bc8b61f65726 Steven Rostedt 2011-07-14 3118
:::::: The code at line 3109 was first introduced by commit
:::::: 8c4f3c3fa9681dc549cd35419b259496082fef8b ftrace: Check module functions being traced on reload
:::::: TO: Steven Rostedt (Red Hat) <rostedt@...dmis.org>
:::::: CC: Steven Rostedt <rostedt@...dmis.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
View attachment "config" of type "text/plain" (120849 bytes)
Powered by blists - more mailing lists