From: Bart Van Assche <bvanassche@acm.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Nick Desaulniers <ndesaulniers@google.com>,
kbuild test robot <lkp@intel.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
kbuild-all@lists.01.org,
clang-built-linux <clang-built-linux@googlegroups.com>,
linux-scsi <linux-scsi@vger.kernel.org>,
Daniel Wagner <dwagner@suse.de>,
Himanshu Madhani <himanshu.madhani@oracle.com>,
Hannes Reinecke <hare@suse.de>,
Rajan Shanmugavelu <rajan.shanmugavelu@oracle.com>,
Joe Jin <joe.jin@oracle.com>, Nilesh Javali <njavali@marvell.com>,
Quinn Tran <qutran@marvell.com>
Subject: Re: [PATCH v5 02/11] qla2xxx: Suppress two recently introduced compiler warnings
Date: Fri, 8 May 2020 15:29:37 -0700 [thread overview]
Message-ID: <040756ba-81ea-64e4-6a11-85608b871b88@acm.org> (raw)
In-Reply-To: <CAK8P3a3PA25WUJp73Yea9xq_ca3uXA9Vz2U=UmHiDhg8FmGiNw@mail.gmail.com>
On 2020-05-08 14:25, Arnd Bergmann wrote:
> On Fri, May 8, 2020 at 1:16 AM Bart Van Assche <bvanassche@acm.org> wrote:
>>
>> On 2020-05-07 15:00, Nick Desaulniers wrote:
>>> On Thu, May 7, 2020 at 12:18 PM kbuild test robot <lkp@intel.com> wrote:
>>>> All errors (new ones prefixed by >>):
>>>>
>>>> In file included from drivers/scsi/qla2xxx/qla_dbg.c:77:
>>>>>> include/trace/events/qla.h:13:32: error: unknown warning group '-Wsuggest-attribute=format', ignored [-Werror,-Wunknown-warning-option]
>>>> #pragma GCC diagnostic ignored "-Wsuggest-attribute=format"
>>>> ^
>>>
>>> Hi Bart,
>>> These compiler specific pragma's are not toolchain portable. You'll
>>> need to wrap them in:
>>> #ifndef __clang__
>>> preprocessor macros, or I think we have a pragma helper in tree that
>>> helps with compiler specific pragmas. IIRC it uses _Pragma to define
>>> pragmas in macros.
>> Hi Nick,
>>
>> Thanks for the feedback. I will have a look at _Pragma() and see what
>> the best way is to suppress this warning.
>
> The __diag_ignore() macro in linux/compiler.h should work for this.
Thanks Arnd, that's good to know. Is using __diag_ignore() mandatory in
this case? The following construct seems to work fine with both gcc and
clang:
#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)
Bart.
next prev parent reply other threads:[~2020-05-08 22:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-07 4:28 [PATCH v5 00/11] Fix qla2xxx endianness annotations Bart Van Assche
2020-05-07 4:28 ` [PATCH v5 01/11] qla2xxx: Fix spelling of a variable name Bart Van Assche
2020-05-07 4:28 ` [PATCH v5 02/11] qla2xxx: Suppress two recently introduced compiler warnings Bart Van Assche
2020-05-07 19:17 ` kbuild test robot
2020-05-07 22:00 ` Nick Desaulniers
2020-05-07 23:16 ` Bart Van Assche
2020-05-08 21:25 ` Arnd Bergmann
2020-05-08 22:29 ` Bart Van Assche [this message]
2020-05-09 7:59 ` Arnd Bergmann
2020-05-07 4:28 ` [PATCH v5 03/11] qla2xxx: Sort BUILD_BUG_ON() statements alphabetically Bart Van Assche
2020-05-07 4:28 ` [PATCH v5 04/11] qla2xxx: Add more BUILD_BUG_ON() statements Bart Van Assche
2020-05-07 4:28 ` [PATCH v5 05/11] qla2xxx: Make a gap in struct qla2xxx_offld_chain explicit Bart Van Assche
2020-05-07 4:28 ` [PATCH v5 06/11] qla2xxx: Increase the size of struct qla_fcp_prio_cfg to FCP_PRIO_CFG_SIZE Bart Van Assche
2020-05-07 4:28 ` [PATCH v5 07/11] qla2xxx: Change two hardcoded constants into offsetof() / sizeof() expressions Bart Van Assche
2020-05-07 4:28 ` [PATCH v5 08/11] qla2xxx: Fix the code that reads from mailbox registers Bart Van Assche
2020-05-07 4:28 ` [PATCH v5 09/11] qla2xxx: Change {RD,WRT}_REG_*() function names from upper case into lower case Bart Van Assche
2020-05-07 8:30 ` Hannes Reinecke
2020-05-07 4:28 ` [PATCH v5 10/11] qla2xxx: Fix endianness annotations in header files Bart Van Assche
2020-05-07 8:31 ` Hannes Reinecke
2020-05-07 4:28 ` [PATCH v5 11/11] qla2xxx: Fix endianness annotations in source files Bart Van Assche
2020-05-07 9:05 ` Hannes Reinecke
2020-05-07 17:27 ` Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=040756ba-81ea-64e4-6a11-85608b871b88@acm.org \
--to=bvanassche@acm.org \
--cc=arnd@arndb.de \
--cc=clang-built-linux@googlegroups.com \
--cc=dwagner@suse.de \
--cc=hare@suse.de \
--cc=himanshu.madhani@oracle.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=joe.jin@oracle.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-scsi@vger.kernel.org \
--cc=lkp@intel.com \
--cc=martin.petersen@oracle.com \
--cc=ndesaulniers@google.com \
--cc=njavali@marvell.com \
--cc=qutran@marvell.com \
--cc=rajan.shanmugavelu@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox