Re: [PATCH] scsi: fcoe: fix mismatched fcoe_wwn_from_mac declaration

From: Martin K. Petersen
Date: Tue Apr 06 2021 - 00:53:51 EST


On Mon, 22 Mar 2021 17:46:59 +0100, Arnd Bergmann wrote:

> An old cleanup changed the array size from MAX_ADDR_LEN to
> unspecified in the declaration, but now gcc-11 warns about this:
>
> drivers/scsi/fcoe/fcoe_ctlr.c:1972:37: error: argument 1 of type ‘unsigned char[32]’ with mismatched bound [-Werror=array-parameter=]
> 1972 | u64 fcoe_wwn_from_mac(unsigned char mac[MAX_ADDR_LEN],
> | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
> In file included from /git/arm-soc/drivers/scsi/fcoe/fcoe_ctlr.c:33:
> include/scsi/libfcoe.h:252:37: note: previously declared as ‘unsigned char[]’
> 252 | u64 fcoe_wwn_from_mac(unsigned char mac[], unsigned int, unsigned int);
> | ~~~~~~~~~~~~~~^~~~~
>
> [...]

Applied to 5.13/scsi-queue, thanks!

[1/1] scsi: fcoe: fix mismatched fcoe_wwn_from_mac declaration
https://git.kernel.org/mkp/scsi/c/5b11c9d80bde

--
Martin K. Petersen Oracle Linux Engineering