linux-brain/drivers/isdn/capi
Arnd Bergmann e57e2dd9bb isdn: capi: fix mismatched prototypes
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>
2021-05-22 11:38:27 +02:00
..
Kconfig isdn: move capi drivers to staging 2019-05-31 11:17:41 +02:00
Makefile isdn: move capi drivers to staging 2019-05-31 11:17:41 +02:00
capi.c net: use skb_queue_empty_lockless() in poll() handlers 2019-10-28 13:33:41 -07:00
capilib.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
capiutil.c isdn/capi: correct argument types of command_2_index 2014-12-10 15:06:10 -05:00
kcapi.c isdn: capi: fix mismatched prototypes 2021-05-22 11:38:27 +02:00
kcapi.h isdn: whitespace coding style cleanup 2012-02-21 09:04:01 -08:00
kcapi_proc.c proc: introduce proc_create_seq{,_data} 2018-05-16 07:23:35 +02:00