From a3fb7aecaf8a43331521ee1e0c7633594f9d17a9 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 29 May 2021 20:20:59 +0200 Subject: [PATCH] 5.4-stable patches added patches: kgdb-fix-gcc-11-warnings-harder.patch --- .../kgdb-fix-gcc-11-warnings-harder.patch | 40 +++++++++++++++++++ queue-5.4/series | 1 + 2 files changed, 41 insertions(+) create mode 100644 queue-5.4/kgdb-fix-gcc-11-warnings-harder.patch diff --git a/queue-5.4/kgdb-fix-gcc-11-warnings-harder.patch b/queue-5.4/kgdb-fix-gcc-11-warnings-harder.patch new file mode 100644 index 00000000000..fc04982c358 --- /dev/null +++ b/queue-5.4/kgdb-fix-gcc-11-warnings-harder.patch @@ -0,0 +1,40 @@ +From bda7d3ab06f19c02dcef61fefcb9dd954dfd5e4f Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Thu, 20 May 2021 15:08:39 +0200 +Subject: kgdb: fix gcc-11 warnings harder + +From: Greg Kroah-Hartman + +commit bda7d3ab06f19c02dcef61fefcb9dd954dfd5e4f upstream. + +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 +Cc: Daniel Thompson +Cc: Jason Wessel +Link: https://lore.kernel.org/r/20210520130839.51987-1-gregkh@linuxfoundation.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/misc/kgdbts.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/misc/kgdbts.c ++++ b/drivers/misc/kgdbts.c +@@ -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 { \ diff --git a/queue-5.4/series b/queue-5.4/series index 17dcc0e2db3..2ecd75583ec 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -34,3 +34,4 @@ drm-amdgpu-vcn2.5-add-cancel_delayed_work_sync-before-power-gate.patch selftests-gpio-use-test_gen_progs_extended.patch selftests-gpio-move-include-of-lib.mk-up.patch selftests-gpio-fix-build-when-source-tree-is-read-on.patch +kgdb-fix-gcc-11-warnings-harder.patch -- 2.47.3