lkml.org 
[lkml]   [2020]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectinclude/linux/compiler.h:61:16: warning: function 'trace_event_raw_event_qla_log_event' might be a candidate for 'gnu_printf' format attribute
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 115a54162a6c0d0ef2aef25ebd0b61fc5e179ebe
commit: 598a90f2002c4c4daee24d76d24e8270c7075eef scsi: qla2xxx: add ring buffer for tracing debug logs
date: 2 months ago
config: arc-randconfig-r032-20200520 (attached as .config)
compiler: arc-elf-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 598a90f2002c4c4daee24d76d24e8270c7075eef
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from include/linux/kernel.h:11,
from drivers/scsi/qla2xxx/qla_def.h:10,
from drivers/scsi/qla2xxx/qla_dbg.c:73:
include/trace/events/qla.h: In function 'trace_event_raw_event_qla_log_event':
>> include/linux/compiler.h:61:16: warning: function 'trace_event_raw_event_qla_log_event' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
61 | static struct ftrace_branch_data | ^~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:69: note: in expansion of macro '__trace_if_value'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
include/trace/trace_events.h:702:2: note: in expansion of macro 'if'
702 | if (!entry) | ^~
include/trace/events/qla.h:12:1: note: in expansion of macro 'DECLARE_EVENT_CLASS'
12 | DECLARE_EVENT_CLASS(qla_log_event,
| ^~~~~~~~~~~~~~~~~~~

vim +61 include/linux/compiler.h

a15fd609ad53a6 Linus Torvalds 2019-03-20 59
a15fd609ad53a6 Linus Torvalds 2019-03-20 60 #define __trace_if_value(cond) ({ \
2bcd521a684cc9 Steven Rostedt 2008-11-21 @61 static struct ftrace_branch_data \
e04462fb82f8dd Miguel Ojeda 2018-09-03 62 __aligned(4) \
bfafddd8de426d Nick Desaulniers 2019-08-28 63 __section(_ftrace_branch) \
a15fd609ad53a6 Linus Torvalds 2019-03-20 64 __if_trace = { \
2bcd521a684cc9 Steven Rostedt 2008-11-21 65 .func = __func__, \
2bcd521a684cc9 Steven Rostedt 2008-11-21 66 .file = __FILE__, \
2bcd521a684cc9 Steven Rostedt 2008-11-21 67 .line = __LINE__, \
2bcd521a684cc9 Steven Rostedt 2008-11-21 68 }; \
a15fd609ad53a6 Linus Torvalds 2019-03-20 69 (cond) ? \
a15fd609ad53a6 Linus Torvalds 2019-03-20 70 (__if_trace.miss_hit[1]++,1) : \
a15fd609ad53a6 Linus Torvalds 2019-03-20 71 (__if_trace.miss_hit[0]++,0); \
a15fd609ad53a6 Linus Torvalds 2019-03-20 72 })
a15fd609ad53a6 Linus Torvalds 2019-03-20 73

:::::: The code at line 61 was first introduced by commit
:::::: 2bcd521a684cc94befbe2ce7d5b613c841b0d304 trace: profile all if conditionals

:::::: TO: Steven Rostedt <srostedt@redhat.com>
:::::: CC: Ingo Molnar <mingo@elte.hu>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-05-21 00:37    [W:0.026 / U:0.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site