Re: [PATCH v4 02/11] qla2xxx: Suppress two recently introduced compiler warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 4/26/20 10:03 PM, 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"
+
  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


Looks Okay. This is for newly introduced ring buffer tracing.

Reviewed-by: Himanshu Madhani <himanshu.madhani@xxxxxxxxxx>

--
Himanshu Madhani
Oracle Linux Engineering



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux