From: Arnd Bergmann <arnd@kernel.org>
To: Marc Dietrich <marvin24@gmx.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, Arnd Bergmann <arnd@arndb.de>,
linux-kernel@vger.kernel.org,
Kumar Kartikeya Dwivedi <memxor@gmail.com>,
linux-tegra@vger.kernel.org, ac100@lists.launchpad.net
Subject: [PATCH 2/2] staging/nvec:: avoid Wempty-body warning
Date: Mon, 22 Mar 2021 11:35:40 +0100 [thread overview]
Message-ID: <20210322103545.704121-2-arnd@kernel.org> (raw)
In-Reply-To: <20210322103545.704121-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
This driver has a few disabled diagnostics, which can probably
just get removed, or might still be helpful:
drivers/staging/nvec/nvec_ps2.c: In function 'nvec_ps2_notifier':
drivers/staging/nvec/nvec_ps2.c:94:77: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
94 | NVEC_PHD("unhandled mouse event: ", msg, msg[1] + 2);
Changing the empty macro to the usual 'do {} while (0)' at least
shuts up the compiler warnings.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/staging/nvec/nvec_ps2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/nvec/nvec_ps2.c b/drivers/staging/nvec/nvec_ps2.c
index 157009015c3b..06041c7f7d4f 100644
--- a/drivers/staging/nvec/nvec_ps2.c
+++ b/drivers/staging/nvec/nvec_ps2.c
@@ -28,7 +28,7 @@
print_hex_dump(KERN_DEBUG, str, DUMP_PREFIX_NONE, \
16, 1, buf, len, false)
#else
-#define NVEC_PHD(str, buf, len)
+#define NVEC_PHD(str, buf, len) do { } while (0)
#endif
enum ps2_subcmds {
--
2.29.2
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
prev parent reply other threads:[~2021-03-22 10:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-22 10:35 [PATCH 1/2] staging/rtl8192u: avoid Wempty-body warning Arnd Bergmann
2021-03-22 10:35 ` Arnd Bergmann [this message]
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=20210322103545.704121-2-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=ac100@lists.launchpad.net \
--cc=arnd@arndb.de \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=marvin24@gmx.de \
--cc=memxor@gmail.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;
as well as URLs for NNTP newsgroup(s).