On 1/5/22 06:17, Damien Le Moal wrote:
Drivers that need to tweak a device IDENTIFY data implement the read_id() port operation. The IDENTIFY data buffer is passed as an argument to the read_id() operation for drivers to use. However, when this operation is called, the IDENTIFY data is not yet converted to CPU endian and contains le16 words. Change the interface of the read_id operation to pass a __le16 * pointer to the IDENTIFY data buffer to clarify the buffer endianness. Fix the pata_netcell, pata_it821x, ahci_xgene, ahci_ceva and ahci_brcm drivers implementation of this operation and modify the code to corretly deal with identify data words manipulation to avoid sparse warnings such as: drivers/ata/ahci_xgene.c:262:33: warning: invalid assignment: &= drivers/ata/ahci_xgene.c:262:33: left side has type unsigned short drivers/ata/ahci_xgene.c:262:33: right side has type restricted __le16 Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx> --- drivers/ata/ahci_brcm.c | 2 +- drivers/ata/ahci_ceva.c | 5 ++--- drivers/ata/ahci_xgene.c | 2 +- drivers/ata/libata-core.c | 6 +++--- drivers/ata/pata_it821x.c | 23 +++++++++++------------ drivers/ata/pata_netcell.c | 5 +++-- include/linux/libata.h | 5 +++-- 7 files changed, 24 insertions(+), 24 deletions(-) Reviewed-by: Hannes Reinecke <hare@xxxxxxx>
Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect 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