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

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

diff --git a/queue-5.10/cxgb4-fix-the-wmisleading-indentation-warning.patch b/queue-5.10/cxgb4-fix-the-wmisleading-indentation-warning.patch
new file mode 100644 (file)
index 0000000..d40f270
--- /dev/null
@@ -0,0 +1,34 @@
+From ea8146c6845799142aa4ee2660741c215e340cdf Mon Sep 17 00:00:00 2001
+From: Kaixu Xia <kaixuxia@tencent.com>
+Date: Wed, 4 Nov 2020 13:24:04 +0800
+Subject: cxgb4: Fix the -Wmisleading-indentation warning
+
+From: Kaixu Xia <kaixuxia@tencent.com>
+
+commit ea8146c6845799142aa4ee2660741c215e340cdf upstream.
+
+Fix the gcc warning:
+
+drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c:2673:9: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
+ 2673 |         for (i = 0; i < n; ++i) \
+
+Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
+Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
+Link: https://lore.kernel.org/r/1604467444-23043-1-git-send-email-kaixuxia@tencent.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
++++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
+@@ -2671,7 +2671,7 @@ do { \
+       seq_printf(seq, "%-12s", s); \
+       for (i = 0; i < n; ++i) \
+               seq_printf(seq, " %16" fmt_spec, v); \
+-              seq_putc(seq, '\n'); \
++      seq_putc(seq, '\n'); \
+ } while (0)
+ #define S(s, v) S3("s", s, v)
+ #define T3(fmt_spec, s, v) S3(fmt_spec, s, tx[i].v)
diff --git a/queue-5.10/kgdb-fix-gcc-11-warning-on-indentation.patch b/queue-5.10/kgdb-fix-gcc-11-warning-on-indentation.patch
new file mode 100644 (file)
index 0000000..95e8988
--- /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
+@@ -95,19 +95,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 62e696f22775deb5ad8874a546bc138943f1a52a..1e8ea48006e3d6a11d985f6750e38fa20544721c 100644 (file)
@@ -1,3 +1,6 @@
 x86-msr-fix-wr-rdmsr_safe_regs_on_cpu-prototypes.patch
 drm-i915-display-fix-compiler-warning-about-array-overrun.patch
 airo-work-around-stack-usage-warning.patch
+kgdb-fix-gcc-11-warning-on-indentation.patch
+usb-sl811-hcd-improve-misleading-indentation.patch
+cxgb4-fix-the-wmisleading-indentation-warning.patch
diff --git a/queue-5.10/usb-sl811-hcd-improve-misleading-indentation.patch b/queue-5.10/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)