From: Greg Kroah-Hartman Date: Wed, 19 May 2021 17:24:39 +0000 (+0200) Subject: 5.10-stable patches X-Git-Tag: v4.4.269~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2f50ccd87ede47c66031a639a72e0200df718d05;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: isdn-capi-fix-mismatched-prototypes.patch --- diff --git a/queue-5.10/isdn-capi-fix-mismatched-prototypes.patch b/queue-5.10/isdn-capi-fix-mismatched-prototypes.patch new file mode 100644 index 00000000000..af659b32612 --- /dev/null +++ b/queue-5.10/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 +@@ -721,7 +721,7 @@ u16 capi20_put_message(struct capi20_app + * 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; +@@ -787,7 +787,7 @@ u16 capi20_get_version(u32 contr, struct + * 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-5.10/series b/queue-5.10/series index 1e8ea48006e..d3230c640d5 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -4,3 +4,4 @@ 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 +isdn-capi-fix-mismatched-prototypes.patch