On 5/14/20 11:35 PM, Bart Van Assche wrote:
Fix all endianness complaints reported by sparse (C=2) without affecting the behavior of the code on little endian CPUs. Reviewed-by: Himanshu Madhani <himanshu.madhani@xxxxxxxxxx> Cc: Nilesh Javali <njavali@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_attr.c | 3 +- drivers/scsi/qla2xxx/qla_bsg.c | 4 +- drivers/scsi/qla2xxx/qla_dbg.c | 87 +++++++++++++++-------------- drivers/scsi/qla2xxx/qla_init.c | 59 ++++++++++---------- drivers/scsi/qla2xxx/qla_iocb.c | 71 ++++++++++++----------- drivers/scsi/qla2xxx/qla_isr.c | 93 +++++++++++++++---------------- drivers/scsi/qla2xxx/qla_mbx.c | 37 ++++++------ drivers/scsi/qla2xxx/qla_mr.c | 9 ++- drivers/scsi/qla2xxx/qla_nvme.c | 8 +-- drivers/scsi/qla2xxx/qla_nx.c | 89 ++++++++++++++--------------- drivers/scsi/qla2xxx/qla_os.c | 27 ++++----- drivers/scsi/qla2xxx/qla_sup.c | 69 ++++++++++++----------- drivers/scsi/qla2xxx/qla_target.c | 86 ++++++++++++++-------------- drivers/scsi/qla2xxx/qla_tmpl.c | 4 +- 14 files changed, 328 insertions(+), 318 deletions(-)
All looks good, but:
diff --git a/drivers/scsi/qla2xxx/qla_tmpl.c b/drivers/scsi/qla2xxx/qla_tmpl.c index f05a4fa2b9d7..b91ec1c3a3ae 100644 --- a/drivers/scsi/qla2xxx/qla_tmpl.c +++ b/drivers/scsi/qla2xxx/qla_tmpl.c @@ -922,9 +922,9 @@ qla27xx_firmware_info(struct scsi_qla_host *vha, tmp->firmware_version[0] = vha->hw->fw_major_version; tmp->firmware_version[1] = vha->hw->fw_minor_version; tmp->firmware_version[2] = vha->hw->fw_subminor_version; - tmp->firmware_version[3] = cpu_to_le32( + tmp->firmware_version[3] = (__force u32)cpu_to_le32( vha->hw->fw_attributes_h << 16 | vha->hw->fw_attributes); - tmp->firmware_version[4] = cpu_to_le32( + tmp->firmware_version[4] = (__force u32)cpu_to_le32( vha->hw->fw_attributes_ext[1] << 16 | vha->hw->fw_attributes_ext[0]); }
Why do you need (__force u32) here? It should be a 32bit array, and cpu_to_le32() trivially returns 32bits. What's there to force? Otherwise: Reviewed-by: Hannes Reinecke <hare@xxxxxxx> Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@xxxxxxx +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer