]> 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:24:39 +0000 (19:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 17:24:39 +0000 (19:24 +0200)
added patches:
isdn-capi-fix-mismatched-prototypes.patch

queue-5.10/isdn-capi-fix-mismatched-prototypes.patch [new file with mode: 0644]
queue-5.10/series

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 (file)
index 0000000..af659b3
--- /dev/null
@@ -0,0 +1,59 @@
+From 5ee7d4c7fbc9d3119a20b1c77d34003d1f82ac26 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+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 <arnd@arndb.de>
+
+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 <arnd@arndb.de>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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;
index 1e8ea48006e3d6a11d985f6750e38fa20544721c..d3230c640d5f2b84a5f174a1e07aef606949e576 100644 (file)
@@ -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