linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: fcoe: fix mismatched fcoe_wwn_from_mac declaration
@ 2021-03-22 16:46 Arnd Bergmann
  2021-04-06  4:53 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2021-03-22 16:46 UTC (permalink / raw)
  To: Hannes Reinecke, James E.J. Bottomley, Martin K. Petersen,
	Robert Love, James Bottomley, Vasu Dev
  Cc: Arnd Bergmann, linux-scsi, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

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);
      |                       ~~~~~~~~~~~~~~^~~~~

Change the type back to what the function definition uses.

Fixes: fdd78027fd47 ("[SCSI] fcoe: cleans up libfcoe.h and adds fcoe.h for fcoe module")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/scsi/libfcoe.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h
index 2568cb0627ec..fac8e89aed81 100644
--- a/include/scsi/libfcoe.h
+++ b/include/scsi/libfcoe.h
@@ -249,7 +249,7 @@ int fcoe_ctlr_recv_flogi(struct fcoe_ctlr *, struct fc_lport *,
 			 struct fc_frame *);
 
 /* libfcoe funcs */
-u64 fcoe_wwn_from_mac(unsigned char mac[], unsigned int, unsigned int);
+u64 fcoe_wwn_from_mac(unsigned char mac[MAX_ADDR_LEN], unsigned int, unsigned int);
 int fcoe_libfc_config(struct fc_lport *, struct fcoe_ctlr *,
 		      const struct libfc_function_template *, int init_fcp);
 u32 fcoe_fc_crc(struct fc_frame *fp);
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] scsi: fcoe: fix mismatched fcoe_wwn_from_mac declaration
  2021-03-22 16:46 [PATCH] scsi: fcoe: fix mismatched fcoe_wwn_from_mac declaration Arnd Bergmann
@ 2021-04-06  4:53 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2021-04-06  4:53 UTC (permalink / raw)
  To: Hannes Reinecke, James Bottomley, James E.J. Bottomley,
	Robert Love, Arnd Bergmann, Vasu Dev
  Cc: Martin K . Petersen, linux-kernel, linux-scsi, Arnd Bergmann

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-06  4:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-22 16:46 [PATCH] scsi: fcoe: fix mismatched fcoe_wwn_from_mac declaration Arnd Bergmann
2021-04-06  4:53 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).