mbox series

[PATCHv3,0/3] fcoe: cleanup fc_rport_priv usage

Message ID 20190724090056.7506-1-hare@suse.de (mailing list archive)
Headers show
Series fcoe: cleanup fc_rport_priv usage | expand

Message

Hannes Reinecke July 24, 2019, 9 a.m. UTC
Hi all,

the fcoe vn2vn code is using the 'fc_rport_priv' structure as argument to its
internal function, but is really expecting a struct fcoe_rport to immediately
follow this one. This is not only confusing but also an error for new compilers.
So clean up the usage by embedding fc_rport_priv into fcoe_rport, and use the
fcoe_rport structure wherever possible.
This patchset also contains some minor whitespace cleanups for libfc.h.

As usual, comments and reviews are welcome.

Changes to v1:
- Drop patch to remove lld_event_callback

Changes to v2:
- Include reviews from Christoph

Hannes Reinecke (3):
  libfc: Whitespqce cleanup in libfc.h
  fcoe: Embed fc_rport_priv in fcoe_rport structure
  fcoe: pass in fcoe_rport structure instead of fc_rport_priv

 drivers/scsi/fcoe/fcoe_ctlr.c | 138 ++++++++++++++++++++----------------------
 drivers/scsi/libfc/fc_rport.c |   5 +-
 include/scsi/libfc.h          |  52 ++++++++--------
 include/scsi/libfcoe.h        |   1 +
 4 files changed, 96 insertions(+), 100 deletions(-)

Comments

Martin K. Petersen July 30, 2019, 4:24 p.m. UTC | #1
Hannes,

> the fcoe vn2vn code is using the 'fc_rport_priv' structure as argument
> to its internal function, but is really expecting a struct fcoe_rport
> to immediately follow this one. This is not only confusing but also an
> error for new compilers.  So clean up the usage by embedding
> fc_rport_priv into fcoe_rport, and use the fcoe_rport structure
> wherever possible.  This patchset also contains some minor whitespace
> cleanups for libfc.h.

Applied to 5.3/scsi-fixes. Thanks!