scsi: fcoe: Embed fc_rport_priv in fcoe_rport structure
authorHannes Reinecke <hare@suse.de>
Wed, 24 Jul 2019 09:00:55 +0000 (11:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Aug 2019 15:52:27 +0000 (17:52 +0200)
commit93d6f0841eef6304c13803a84588f00476b06a14
tree0000314ed8642f41817a0628e6f1bab5777904a5
parentcc4c818b2219c58af5f0ca59f3e9f02c48bc0b65
scsi: fcoe: Embed fc_rport_priv in fcoe_rport structure

commit 023358b136d490ca91735ac6490db3741af5a8bd upstream.

Gcc-9 complains for a memset across pointer boundaries, which happens as
the code tries to allocate a flexible array on the stack.  Turns out we
cannot do this without relying on gcc-isms, so with this patch we'll embed
the fc_rport_priv structure into fcoe_rport, can use the normal
'container_of' outcast, and will only have to do a memset over one
structure.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/fcoe/fcoe_ctlr.c
drivers/scsi/libfc/fc_rport.c
include/scsi/libfcoe.h