From patchwork Mon May 18 21:16:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 11556385 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F20D413B1 for ; Mon, 18 May 2020 21:17:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E2680207F9 for ; Mon, 18 May 2020 21:17:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727037AbgERVRY (ORCPT ); Mon, 18 May 2020 17:17:24 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:37712 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726250AbgERVRY (ORCPT ); Mon, 18 May 2020 17:17:24 -0400 Received: by mail-pf1-f195.google.com with SMTP id y198so3957825pfb.4 for ; Mon, 18 May 2020 14:17:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=63pNs68I/xD/4flIFYQY8xsHu4flsoym9FPsoghGBfE=; b=Dzz6MtzGJd+Sna9TyKmVFz6QD2wqENmJ9F1/p6R0zdgnXgNb0wDOiALUa8uLwM3SNf IzusZdVrGXdNf96RdpeovtkDe+SyMEIF9yC4w8kLT412z1fMRG1vtRzT4kYnwPegyyJU 7MK++UjU0GRACQ0H4N4d7qAJaNQtYKjvFMhMRJ3YqfBdzGXSLYQ9YMLaev40S1N74Cjq KY9jyoqKgBWU1ftjSWOguJcjNDR151X6lisFqcRGhNgt8ccl5Fm88r+eCH+vRO7Yk3LT e4p87ketVSsfjy+3ZUQ2J4tbq6BEnsgBAt12I6Z0EjH7rckqkXaHwb+MSLdY8DDzRFq5 JlgA== X-Gm-Message-State: AOAM532NWtt9dQEvx+XG7XgfY8UyaL9ltoZtaUvjvFA0p3Vx5N6ReX4L EFcpMmTaDsVcGZgdzFUowTQ= X-Google-Smtp-Source: ABdhPJwPx3QoJiXyYR1V6oA+UaJCAApbGfJTU/+1+bCnxu1tIev8vEAeF5AOQFtJDwOr0BQVTLko4w== X-Received: by 2002:a62:1957:: with SMTP id 84mr15727686pfz.54.1589836642218; Mon, 18 May 2020 14:17:22 -0700 (PDT) Received: from localhost.localdomain ([2601:647:4000:d7:dc5d:b628:d57b:164]) by smtp.gmail.com with ESMTPSA id i184sm8813123pgc.36.2020.05.18.14.17.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 14:17:21 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Hannes Reinecke , Arun Easi , Bart Van Assche , Daniel Wagner , Himanshu Madhani , Rajan Shanmugavelu , Joe Jin , Nilesh Javali , Quinn Tran , Martin Wilck Subject: [PATCH v7 02/15] qla2xxx: Suppress two recently introduced compiler warnings Date: Mon, 18 May 2020 14:16:59 -0700 Message-Id: <20200518211712.11395-3-bvanassche@acm.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200518211712.11395-1-bvanassche@acm.org> References: <20200518211712.11395-1-bvanassche@acm.org> MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org 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' Reviewed-by: Daniel Wagner Reviewed-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Reviewed-by: Arun Easi Cc: Rajan Shanmugavelu Cc: Joe Jin Cc: Nilesh Javali Cc: Quinn Tran Cc: Martin Wilck Fixes: 598a90f2002c ("scsi: qla2xxx: add ring buffer for tracing debug logs") Signed-off-by: Bart Van Assche --- include/trace/events/qla.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/trace/events/qla.h b/include/trace/events/qla.h index b71f680968eb..5857cf682ee7 100644 --- a/include/trace/events/qla.h +++ b/include/trace/events/qla.h @@ -9,6 +9,11 @@ #define QLA_MSG_MAX 256 +#pragma GCC diagnostic push +#ifndef __clang__ +#pragma GCC diagnostic ignored "-Wsuggest-attribute=format" +#endif + DECLARE_EVENT_CLASS(qla_log_event, TP_PROTO(const char *buf, struct va_format *vaf), @@ -27,6 +32,8 @@ DECLARE_EVENT_CLASS(qla_log_event, TP_printk("%s %s", __get_str(buf), __get_str(msg)) ); +#pragma GCC diagnostic pop + DEFINE_EVENT(qla_log_event, ql_dbg_log, TP_PROTO(const char *buf, struct va_format *vaf), TP_ARGS(buf, vaf)