Skip to content

Commit e8fbdf1

Browse files
author
Damien Le Moal
committed
ata: ahci_xgene: Fix compilation warning
When compiling with clang and W=1, the following warning is generated: drivers/ata/ahci_xgene.c:788:14: error: cast to smaller integer type 'enum xgene_ahci_version' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] version = (enum xgene_ahci_version) of_devid->data; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix this by using a cast to unsigned long to match the "void *" type size of of_devid->data. Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
1 parent 7d7b0c8 commit e8fbdf1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ata/ahci_xgene.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ static int xgene_ahci_probe(struct platform_device *pdev)
785785
of_devid = of_match_device(xgene_ahci_of_match, dev);
786786
if (of_devid) {
787787
if (of_devid->data)
788-
version = (enum xgene_ahci_version) of_devid->data;
788+
version = (unsigned long) of_devid->data;
789789
}
790790
#ifdef CONFIG_ACPI
791791
else {

0 commit comments

Comments
 (0)