From 901df1fbb2da6dbfb28e844b87373f54d43d7c78 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 19 May 2021 19:23:27 +0200 Subject: [PATCH] 4.4-stable patches added patches: cxgb4-fix-the-wmisleading-indentation-warning.patch isdn-capi-fix-mismatched-prototypes.patch --- ...-the-wmisleading-indentation-warning.patch | 34 +++++++++++ .../isdn-capi-fix-mismatched-prototypes.patch | 59 +++++++++++++++++++ queue-4.4/series | 2 + 3 files changed, 95 insertions(+) create mode 100644 queue-4.4/cxgb4-fix-the-wmisleading-indentation-warning.patch create mode 100644 queue-4.4/isdn-capi-fix-mismatched-prototypes.patch diff --git a/queue-4.4/cxgb4-fix-the-wmisleading-indentation-warning.patch b/queue-4.4/cxgb4-fix-the-wmisleading-indentation-warning.patch new file mode 100644 index 00000000000..1940713f30f --- /dev/null +++ b/queue-4.4/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 +@@ -2263,7 +2263,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-4.4/isdn-capi-fix-mismatched-prototypes.patch b/queue-4.4/isdn-capi-fix-mismatched-prototypes.patch new file mode 100644 index 00000000000..c7c247b5609 --- /dev/null +++ b/queue-4.4/isdn-capi-fix-mismatched-prototypes.patch @@ -0,0 +1,59 @@ +From 5ee7d4c7fbc9d3119a20b1c77d34003d1f82ac26 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Mon, 22 Mar 2021 17:44:29 +0100 +Subject: isdn: capi: fix mismatched prototypes +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Arnd Bergmann + +commit 5ee7d4c7fbc9d3119a20b1c77d34003d1f82ac26 upstream. + +gcc-11 complains about a prototype declaration that is different +from the function definition: + +drivers/isdn/capi/kcapi.c:724:44: error: argument 2 of type ‘u8 *’ {aka ‘unsigned char *’} declared as a pointer [-Werror=array-parameter=] + 724 | u16 capi20_get_manufacturer(u32 contr, u8 *buf) + | ~~~~^~~ +In file included from drivers/isdn/capi/kcapi.c:13: +drivers/isdn/capi/kcapi.h:62:43: note: previously declared as an array ‘u8[64]’ {aka ‘unsigned char[64]’} + 62 | u16 capi20_get_manufacturer(u32 contr, u8 buf[CAPI_MANUFACTURER_LEN]); + | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ +drivers/isdn/capi/kcapi.c:790:38: error: argument 2 of type ‘u8 *’ {aka ‘unsigned char *’} declared as a pointer [-Werror=array-parameter=] + 790 | u16 capi20_get_serial(u32 contr, u8 *serial) + | ~~~~^~~~~~ +In file included from drivers/isdn/capi/kcapi.c:13: +drivers/isdn/capi/kcapi.h:64:37: note: previously declared as an array ‘u8[8]’ {aka ‘unsigned char[8]’} + 64 | u16 capi20_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN]); + | ~~~^~~~~~~~~~~~~~~~~~~~~~~ + +Change the definition to make them match. + +Signed-off-by: Arnd Bergmann +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + drivers/isdn/capi/kcapi.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/isdn/capi/kcapi.c ++++ b/drivers/isdn/capi/kcapi.c +@@ -845,7 +845,7 @@ EXPORT_SYMBOL(capi20_put_message); + * Return value: CAPI result code + */ + +-u16 capi20_get_manufacturer(u32 contr, u8 *buf) ++u16 capi20_get_manufacturer(u32 contr, u8 buf[CAPI_MANUFACTURER_LEN]) + { + struct capi_ctr *ctr; + u16 ret; +@@ -915,7 +915,7 @@ EXPORT_SYMBOL(capi20_get_version); + * Return value: CAPI result code + */ + +-u16 capi20_get_serial(u32 contr, u8 *serial) ++u16 capi20_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN]) + { + struct capi_ctr *ctr; + u16 ret; diff --git a/queue-4.4/series b/queue-4.4/series index 3d5b2b11dac..193ed54215c 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -177,3 +177,5 @@ kobject_uevent-remove-warning-in-init_uevent_argv.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 +cxgb4-fix-the-wmisleading-indentation-warning.patch +isdn-capi-fix-mismatched-prototypes.patch -- 2.47.3