Skip to contentSkip to conversation

kgdb: fix gcc-11 warnings harder

PATCH New Greg Kroah-Hartman 1 participant 1 message May 20, 2021

Subsystems (2)
lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

PATCH 1/1 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 <[email protected]>
Cc Daniel Thompson <[email protected]>
Cc Jason Wessel <[email protected]>
---
 drivers/misc/kgdbts.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/misc/kgdbts.c +2 -1
index 64d33e368509..67c5b452dd35 100644
@@ -101,8 +101,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 {		\
Signature · 1 line
2.31.1