[jolsa-perf:ftrace/direct 4/8] kernel/trace/trace_selftest.c:753:32: error: 'trace_direct_tramp' defined but not used

From: kernel test robot
Date: Sun Oct 31 2021 - 13:40:45 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git ftrace/direct
head: b171ddeaf8fd82ae5e703a9ec28dc4a44f8f0019
commit: 0b1d3b2f86afd6dfbe4127ac520f532d31853b32 [4/8] tracing: Add trampoline/graph selftest
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 11.2.0
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/jolsa/perf.git/commit/?id=0b1d3b2f86afd6dfbe4127ac520f532d31853b32
git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
git fetch --no-tags jolsa-perf ftrace/direct
git checkout 0b1d3b2f86afd6dfbe4127ac520f532d31853b32
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=sh

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

kernel/trace/trace.c: In function 'trace_check_vprintf':
kernel/trace/trace.c:3813:17: error: function 'trace_check_vprintf' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format]
3813 | trace_seq_vprintf(&iter->seq, iter->fmt, ap);
| ^~~~~~~~~~~~~~~~~
kernel/trace/trace.c:3868:17: error: function 'trace_check_vprintf' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format]
3868 | trace_seq_vprintf(&iter->seq, p, ap);
| ^~~~~~~~~~~~~~~~~
In file included from kernel/trace/trace.c:8597:
At top level:
>> kernel/trace/trace_selftest.c:753:32: error: 'trace_direct_tramp' defined but not used [-Werror=unused-function]
753 | noinline __noclone static void trace_direct_tramp(void) { }
| ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors


vim +/trace_direct_tramp +753 kernel/trace/trace_selftest.c

752
> 753 noinline __noclone static void trace_direct_tramp(void) { }
754

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

Attachment: .config.gz
Description: application/gzip