mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* include/linux/compiler.h:61:16: warning: function 'trace_event_raw_event_qla_log_event' might be a candidate for 'gnu_printf' format attribute
@ 2020-05-20 22:30 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-05-20 22:30 UTC (permalink / raw)
  To: Rajan Shanmugavelu; +Cc: kbuild-all, linux-kernel, Martin K. Petersen, Joe Jin

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

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

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

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

only message in thread, other threads:[~2020-05-20 22:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-20 22:30 include/linux/compiler.h:61:16: warning: function 'trace_event_raw_event_qla_log_event' might be a candidate for 'gnu_printf' format attribute kbuild 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®