• Damien Le Moal's avatar
    ata: fix read_id() ata port operation interface · 0561e514
    Damien Le Moal authored
    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: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
    Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
    0561e514
ahci_ceva.c 9.96 KB