On Mon, Jun 15, 2015 at 11:31:58PM -0400, Benjamin Romer wrote: > From: David Kershner <david.kershner@xxxxxxxxxx> > > During testing with visornic the offset of num_rcv_bufs > was being reported at 188 instead of 186. The vnic structure > starts at 180 and the macaddr is only 6 bytes long. > > When I defined and packed the structures outside of the struct > and then referenced them in the struct the correct offset > was generated. > > Signed-off-by: David Kershner <david.kershner@xxxxxxxxxx> > Signed-off-by: Benjamin Romer <benjamin.romer@xxxxxxxxxx> > --- > drivers/staging/unisys/include/iochannel.h | 24 +++++++++++++----------- > 1 file changed, 13 insertions(+), 11 deletions(-) > > diff --git a/drivers/staging/unisys/include/iochannel.h b/drivers/staging/unisys/include/iochannel.h > index 64a581a..a559812 100644 > --- a/drivers/staging/unisys/include/iochannel.h > +++ b/drivers/staging/unisys/include/iochannel.h > @@ -540,6 +540,16 @@ struct uiscmdrsp { > struct uiscmdrsp *activeQ_prev; /* Used to track active commands */ > } __packed; > > +struct iochannel_vhba { > + struct vhba_wwnn wwnn; /* 8 bytes */ > + struct vhba_config_max max; /* 20 bytes */ > +} __packed; /* total = 28 bytes */ > +struct iochannel_vnic { > + u8 macaddr[6]; /* 6 bytes */ > + u32 num_rcv_bufs; /* 4 bytes */ > + u32 mtu; /* 4 bytes */ > + uuid_le zone_uuid; /* 16 bytes */ > +} __packed; > /* This is just the header of the IO channel. It is assumed that directly after Minor nit, for future patches to fix, try putting blank lines between structure definitions. thanks, greg k-h _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel