On 1/4/22 11:58 AM, Damien Le Moal wrote: > The fields of the cmdhdr_tbl_entry structure all store __le32 values, > and so are the dba and ddc_and_ext fields of the prde structure. Define > these fields using the __le32 type to avoid sparse warnings about > incorrect type in assignment. > > Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx> > --- > drivers/ata/sata_fsl.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c > index 101d4dd79f62..13d532193405 100644 > --- a/drivers/ata/sata_fsl.c > +++ b/drivers/ata/sata_fsl.c > @@ -221,10 +221,10 @@ enum { > * 4 Dwords per command slot, command header size == 64 Dwords. > */ > struct cmdhdr_tbl_entry { > - u32 cda; > - u32 prde_fis_len; > - u32 ttl; > - u32 desc_info; > + __le32 cda; > + __le32 prde_fis_len; > + __le32 ttl; > + __le32 desc_info; > }; > > /* > @@ -259,9 +259,9 @@ struct command_desc { > */ > > struct prde { > - u32 dba; > + __le32 dba; > u8 fill[2 * 4]; > - u32 ddc_and_ext; > + __le32 ddc_and_ext; > }; > > /* > ... which means that _technically_ we should modify the log message in sata_fsl_setup_cmd_hdr_entry() to use le32_to_cpu(), too, to avoid garbled numbers on big endian. Or maybe not, if we argue that we want to print out the values as sent to the HW. Anyway. Reviewed-by: Hannes Reinecke <hare@xxxxxxx> Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@xxxxxxx +49 911 74053 688 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), GF: Felix Imendörffer