Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kgdb: fix gcc-11 warnings harder

40cc3a80bb42 ("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: 40cc3a80bb42 ("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>

+2 -1
+2 -1
drivers/misc/kgdbts.c
··· 101 101 printk(KERN_INFO a); \ 102 102 } while (0) 103 103 #define v2printk(a...) do { \ 104 - if (verbose > 1) \ 104 + if (verbose > 1) { \ 105 105 printk(KERN_INFO a); \ 106 + } \ 106 107 touch_nmi_watchdog(); \ 107 108 } while (0) 108 109 #define eprintk(a...) do { \