Re: [PATCH] bluetooth: fix set_ecdh_privkey() prototype

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Arnd,

> gcc-11 points out that the declaration does not match the definition:
> 
> net/bluetooth/ecdh_helper.c:122:55: error: argument 2 of type ‘const u8[32]’ {aka ‘const unsigned char[32]’} with mismatched bound [-Werror=array-parameter=]
>  122 | int set_ecdh_privkey(struct crypto_kpp *tfm, const u8 private_key[32])
>      |                                              ~~~~~~~~~^~~~~~~~~~~~~~~
> In file included from net/bluetooth/ecdh_helper.c:23:
> net/bluetooth/ecdh_helper.h:28:56: note: previously declared as ‘const u8 *’ {aka ‘const unsigned char *’}
>   28 | int set_ecdh_privkey(struct crypto_kpp *tfm, const u8 *private_key);
>      |                                              ~~~~~~~~~~^~~~~~~~~~~
> 
> Change the declaration to contain the size of the array, rather than
> just a pointer.
> 
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
> net/bluetooth/ecdh_helper.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux