Skip to content

Commit

Permalink
kgdb: fix gcc-11 warnings harder
Browse files Browse the repository at this point in the history
commit bda7d3a upstream.

40cc3a8 ("kgdb: fix gcc-11 warning on indentation") tried to fix up
the gcc-11 complaints in this file by just reformatting the #defines.
That worked for gcc 11.1.0, but in gcc 11.1.1 as shipped by Fedora 34,
the warning came back for one of the #defines.

Fix this up again by putting { } around the if statement, now it is
quiet again.

Fixes: 40cc3a8 ("kgdb: fix gcc-11 warning on indentation")
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Jason Wessel <jason.wessel@windriver.com>
Link: https://lore.kernel.org/r/20210520130839.51987-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
gregkh committed Jun 3, 2021
1 parent d88d418 commit 3f423c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/misc/kgdbts.c
Expand Up @@ -100,8 +100,9 @@
printk(KERN_INFO a); \
} while (0)
#define v2printk(a...) do { \
if (verbose > 1) \
if (verbose > 1) { \
printk(KERN_INFO a); \
} \
touch_nmi_watchdog(); \
} while (0)
#define eprintk(a...) do { \
Expand Down

0 comments on commit 3f423c0

Please sign in to comment.