Hi Bart, [Cc: added Steven] On Sun, Apr 26, 2020 at 08:03:01PM -0700, Bart Van Assche wrote: > Suppress the following two compiler warnings because these are not useful: > > In file included from ./include/trace/define_trace.h:102, > from ./include/trace/events/qla.h:39, > from drivers/scsi/qla2xxx/qla_dbg.c:77: > ./include/trace/events/qla.h: In function 'trace_event_raw_event_qla_log_event': > ./include/trace/trace_events.h:691:9: warning: function 'trace_event_raw_event_qla_log_event' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] > 691 | struct trace_event_raw_##call *entry; \ > | ^~~~~~~~~~~~~~~~ > ./include/trace/events/qla.h:12:1: note: in expansion of macro 'DECLARE_EVENT_CLASS' > 12 | DECLARE_EVENT_CLASS(qla_log_event, > | ^~~~~~~~~~~~~~~~~~~ > In file included from ./include/trace/define_trace.h:103, > from ./include/trace/events/qla.h:39, > from drivers/scsi/qla2xxx/qla_dbg.c:77: > ./include/trace/events/qla.h: In function 'perf_trace_qla_log_event': > ./include/trace/perf.h:41:9: warning: function 'perf_trace_qla_log_event' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] > 41 | struct hlist_head *head; \ > | ^~~~~~~~~~ > ./include/trace/events/qla.h:12:1: note: in expansion of macro 'DECLARE_EVENT_CLASS' > > Cc: Rajan Shanmugavelu <rajan.shanmugavelu@xxxxxxxxxx> > Cc: Joe Jin <joe.jin@xxxxxxxxxx> > Cc: Nilesh Javali <njavali@xxxxxxxxxxx> > Cc: Himanshu Madhani <himanshu.madhani@xxxxxxxxxx> > Cc: Quinn Tran <qutran@xxxxxxxxxxx> > Cc: Martin Wilck <mwilck@xxxxxxxx> > Cc: Daniel Wagner <dwagner@xxxxxxx> > Fixes: 598a90f2002c ("scsi: qla2xxx: add ring buffer for tracing debug logs") > Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> > --- > include/trace/events/qla.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/include/trace/events/qla.h b/include/trace/events/qla.h > index b71f680968eb..737a667ab98f 100644 > --- a/include/trace/events/qla.h > +++ b/include/trace/events/qla.h > @@ -9,6 +9,9 @@ > > #define QLA_MSG_MAX 256 > > +#pragma GCC diagnostic push > +#pragma GCC diagnostic ignored "-Wsuggest-attribute=format" I would be really surprised if this is needed for every single DECLARE_EVENT_CLASS declaration. > DECLARE_EVENT_CLASS(qla_log_event, > TP_PROTO(const char *buf, > struct va_format *vaf), > @@ -32,6 +35,8 @@ DEFINE_EVENT(qla_log_event, ql_dbg_log, > TP_ARGS(buf, vaf) > ); > > +#pragma GCC diagnostic pop > + > #endif /* _TRACE_QLA_H */ > > #define TRACE_INCLUDE_FILE qla Thanks, Daniel