]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
staging/nvec:: avoid Wempty-body warning
authorArnd Bergmann <arnd@arndb.de>
Mon, 22 Mar 2021 10:35:40 +0000 (11:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Mar 2021 16:05:15 +0000 (17:05 +0100)
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>
Link: https://lore.kernel.org/r/20210322103545.704121-2-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/nvec/nvec_ps2.c

index 157009015c3b459e8f0a9ce6360f26b4c0b7880c..06041c7f7d4ff0d12d93e0fcd25443aa585f9bb6 100644 (file)
@@ -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 {