From: Greg Kroah-Hartman Date: Wed, 19 May 2021 17:20:10 +0000 (+0200) Subject: 5.10-stable patches X-Git-Tag: v4.4.269~27 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c610cb5c79933d313d0a17a5f38ad9d8fecafcce;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: cxgb4-fix-the-wmisleading-indentation-warning.patch kgdb-fix-gcc-11-warning-on-indentation.patch usb-sl811-hcd-improve-misleading-indentation.patch --- 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 index 00000000000..d40f27061c6 --- /dev/null +++ b/queue-5.10/cxgb4-fix-the-wmisleading-indentation-warning.patch @@ -0,0 +1,34 @@ +From ea8146c6845799142aa4ee2660741c215e340cdf Mon Sep 17 00:00:00 2001 +From: Kaixu Xia +Date: Wed, 4 Nov 2020 13:24:04 +0800 +Subject: cxgb4: Fix the -Wmisleading-indentation warning + +From: Kaixu Xia + +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 +Signed-off-by: Kaixu Xia +Link: https://lore.kernel.org/r/1604467444-23043-1-git-send-email-kaixuxia@tencent.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..95e8988276b --- /dev/null +++ b/queue-5.10/kgdb-fix-gcc-11-warning-on-indentation.patch @@ -0,0 +1,71 @@ +From 40cc3a80bb42587db1e6ae21d6f3090582d33e89 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +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 + +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 +Signed-off-by: Arnd Bergmann +Link: https://lore.kernel.org/r/20210322164308.827846-1-arnd@kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + 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 + +-#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; diff --git a/queue-5.10/series b/queue-5.10/series index 62e696f2277..1e8ea48006e 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -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 index 00000000000..c973f606e29 --- /dev/null +++ b/queue-5.10/usb-sl811-hcd-improve-misleading-indentation.patch @@ -0,0 +1,48 @@ +From 8460f6003a1d2633737b89c4f69d6f4c0c7c65a3 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +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 + +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 +Link: https://lore.kernel.org/r/20210322164244.827589-1-arnd@kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + 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)