]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 30 Jul 2019 01:12:35 +0000 (21:12 -0400)
commita632d3836130a3384e072e2454a209eec36ef408
treebe5370ccb0eb4ca07c29875a25de42d56d8e6416
parent7e05af9d247d028d2a15f8a0d3d57c3c68e799b3
scsi: fcoe: Embed fc_rport_priv in fcoe_rport structure

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>
drivers/scsi/fcoe/fcoe_ctlr.c
drivers/scsi/libfc/fc_rport.c
include/scsi/libfcoe.h