Re: [PATCH 2/4] qla2xxx: Fix endianness annotations in header files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bart,

On Sun, Mar 01, 2020 at 07:30:21PM -0800, Bart Van Assche wrote:
> Annotate members of FC protocol and firmware dump data structures as big
> endian. Annotate members of RISC control structures as little endian.
> Annotate mailbox registers as little endian. Annotate the mb[] arrays as
> CPU-endian because communication of the mb[] values with the hardware
> happens through the readw() and writew() functions. readw() converts from
> __le16 to u16 and writew() converts from u16 to __le16.
> 
> Cc: Himanshu Madhani <hmadhani@xxxxxxxxxxx>
> Cc: Quinn Tran <qutran@xxxxxxxxxxx>
> Cc: Martin Wilck <mwilck@xxxxxxxx>
> Cc: Daniel Wagner <dwagner@xxxxxxx>
> Cc: Roman Bolshakov <r.bolshakov@xxxxxxxxx>
> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
> ---
>  drivers/scsi/qla2xxx/qla_dbg.h    | 442 +++++++++---------
>  drivers/scsi/qla2xxx/qla_def.h    | 646 +++++++++++++-------------
>  drivers/scsi/qla2xxx/qla_fw.h     | 738 +++++++++++++++---------------
>  drivers/scsi/qla2xxx/qla_inline.h |   2 +-
>  drivers/scsi/qla2xxx/qla_mr.h     |   8 +-
>  drivers/scsi/qla2xxx/qla_nvme.h   |  46 +-
>  drivers/scsi/qla2xxx/qla_nx.h     |  36 +-
>  drivers/scsi/qla2xxx/qla_target.h | 208 ++++-----
>  8 files changed, 1063 insertions(+), 1063 deletions(-)

I've tried to make sure the new variable type has correct length. I
suspect our tooling will complain if the endian doesn't fit. Looks
good.

Just one nitpick: Sometimes there is an additianol space added between
the type and the variable name, e.g.

> -	uint16_t nport_handle;
> -	uint16_t reserved_1;
> +	__le16	nport_handle;
> +	__le16	reserved_1;

and as result the ovarall aligment in the context is not consistent
anymore. Not how much we care about this.

Reviewed-by: Daniel Wagner <dwagner@xxxxxxx>

Thanks,
Daniel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux