]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 17:19:42 +0000 (19:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 17:19:42 +0000 (19:19 +0200)
added patches:
kgdb-fix-gcc-11-warning-on-indentation.patch
usb-sl811-hcd-improve-misleading-indentation.patch

queue-4.19/kgdb-fix-gcc-11-warning-on-indentation.patch [new file with mode: 0644]
queue-4.19/series
queue-4.19/usb-sl811-hcd-improve-misleading-indentation.patch [new file with mode: 0644]

diff --git a/queue-4.19/kgdb-fix-gcc-11-warning-on-indentation.patch b/queue-4.19/kgdb-fix-gcc-11-warning-on-indentation.patch
new file mode 100644 (file)
index 0000000..fc54762
--- /dev/null
@@ -0,0 +1,71 @@
+From 40cc3a80bb42587db1e6ae21d6f3090582d33e89 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Mon, 22 Mar 2021 17:43:03 +0100
+Subject: kgdb: fix gcc-11 warning on indentation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+commit 40cc3a80bb42587db1e6ae21d6f3090582d33e89 upstream.
+
+gcc-11 starts warning about misleading indentation inside of macros:
+
+drivers/misc/kgdbts.c: In function ‘kgdbts_break_test’:
+drivers/misc/kgdbts.c:103:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
+  103 |         if (verbose > 1) \
+      |         ^~
+drivers/misc/kgdbts.c:200:9: note: in expansion of macro ‘v2printk’
+  200 |         v2printk("kgdbts: breakpoint complete\n");
+      |         ^~~~~~~~
+drivers/misc/kgdbts.c:105:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
+  105 |                 touch_nmi_watchdog();   \
+      |                 ^~~~~~~~~~~~~~~~~~
+
+The code looks correct to me, so just reindent it for readability.
+
+Fixes: e8d31c204e36 ("kgdb: add kgdb internal test suite")
+Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Link: https://lore.kernel.org/r/20210322164308.827846-1-arnd@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/misc/kgdbts.c |   26 +++++++++++++-------------
+ 1 file changed, 13 insertions(+), 13 deletions(-)
+
+--- a/drivers/misc/kgdbts.c
++++ b/drivers/misc/kgdbts.c
+@@ -107,19 +107,19 @@
+ #include <asm/sections.h>
+-#define v1printk(a...) do { \
+-      if (verbose) \
+-              printk(KERN_INFO a); \
+-      } while (0)
+-#define v2printk(a...) do { \
+-      if (verbose > 1) \
+-              printk(KERN_INFO a); \
+-              touch_nmi_watchdog();   \
+-      } while (0)
+-#define eprintk(a...) do { \
+-              printk(KERN_ERR a); \
+-              WARN_ON(1); \
+-      } while (0)
++#define v1printk(a...) do {           \
++      if (verbose)                    \
++              printk(KERN_INFO a);    \
++} while (0)
++#define v2printk(a...) do {           \
++      if (verbose > 1)                \
++              printk(KERN_INFO a);    \
++      touch_nmi_watchdog();           \
++} while (0)
++#define eprintk(a...) do {            \
++      printk(KERN_ERR a);             \
++      WARN_ON(1);                     \
++} while (0)
+ #define MAX_CONFIG_LEN                40
+ static struct kgdb_io kgdbts_io_ops;
index 2ade86806cde2cb7b18901e40a06a307076c7ed5..718e80c1ed2cc55ecc53b0f0dc6b43c2eb666da1 100644 (file)
@@ -393,3 +393,5 @@ netfilter-conntrack-make-global-sysctls-readonly-in-non-init-netns.patch
 clk-exynos7-mark-aclk_fsys1_200-as-critical.patch
 nvme-do-not-try-to-reconfigure-apst-when-the-controller-is-not-live.patch
 x86-msr-fix-wr-rdmsr_safe_regs_on_cpu-prototypes.patch
+kgdb-fix-gcc-11-warning-on-indentation.patch
+usb-sl811-hcd-improve-misleading-indentation.patch
diff --git a/queue-4.19/usb-sl811-hcd-improve-misleading-indentation.patch b/queue-4.19/usb-sl811-hcd-improve-misleading-indentation.patch
new file mode 100644 (file)
index 0000000..c973f60
--- /dev/null
@@ -0,0 +1,48 @@
+From 8460f6003a1d2633737b89c4f69d6f4c0c7c65a3 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Mon, 22 Mar 2021 17:42:26 +0100
+Subject: usb: sl811-hcd: improve misleading indentation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+commit 8460f6003a1d2633737b89c4f69d6f4c0c7c65a3 upstream.
+
+gcc-11 now warns about a confusingly indented code block:
+
+drivers/usb/host/sl811-hcd.c: In function ‘sl811h_hub_control’:
+drivers/usb/host/sl811-hcd.c:1291:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
+ 1291 |         if (*(u16*)(buf+2))     /* only if wPortChange is interesting */
+      |         ^~
+drivers/usb/host/sl811-hcd.c:1295:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
+ 1295 |                 break;
+
+Rewrite this to use a single if() block with the __is_defined() macro.
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Link: https://lore.kernel.org/r/20210322164244.827589-1-arnd@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/host/sl811-hcd.c |    9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+--- a/drivers/usb/host/sl811-hcd.c
++++ b/drivers/usb/host/sl811-hcd.c
+@@ -1287,11 +1287,10 @@ sl811h_hub_control(
+                       goto error;
+               put_unaligned_le32(sl811->port1, buf);
+-#ifndef       VERBOSE
+-      if (*(u16*)(buf+2))     /* only if wPortChange is interesting */
+-#endif
+-              dev_dbg(hcd->self.controller, "GetPortStatus %08x\n",
+-                      sl811->port1);
++              if (__is_defined(VERBOSE) ||
++                  *(u16*)(buf+2)) /* only if wPortChange is interesting */
++                      dev_dbg(hcd->self.controller, "GetPortStatus %08x\n",
++                              sl811->port1);
+               break;
+       case SetPortFeature:
+               if (wIndex != 1 || wLength != 0)