]> git.baikalelectronics.ru Git - kernel.git/commit
ata: ahci_ceva: Fix id array access in ceva_ahci_read_id()
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Thu, 2 Dec 2021 06:27:08 +0000 (15:27 +0900)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Mon, 6 Dec 2021 01:07:47 +0000 (10:07 +0900)
commit914e5094ad87d4a613e377b5482d710e5c8f0161
tree68fcaacd208c3afeedfaa35def3d09b83f5fd3c6
parentbcaa5780ddbeacad7e998e7957fc9a3a5a94c857
ata: ahci_ceva: Fix id array access in ceva_ahci_read_id()

ATA IDENTIFY command returns an array of le16 words. Accessing it as a
u16 array triggers the following sparse warning:

drivers/ata/ahci_ceva.c:107:33: warning: invalid assignment: &=
drivers/ata/ahci_ceva.c:107:33:    left side has type unsigned short
drivers/ata/ahci_ceva.c:107:33:    right side has type restricted __le16

Use a local variable to explicitly cast the id array to __le16 to avoid
this warning.

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
drivers/ata/ahci_ceva.c