Skip to content

Commit 97e0143

Browse files
krzkdamien-lemoal
authored andcommitted
ata: ahci-xgene: Fix Wvoid-pointer-to-enum-cast warning
"version" is an enum, thus cast of pointer on 64-bit compile test with clang W=1 causes: ahci_xgene.c:776:13: error: cast to smaller integer type 'enum xgene_ahci_version' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
1 parent 4afc71c commit 97e0143

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/ata/ahci_xgene.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ static int xgene_ahci_probe(struct platform_device *pdev)
773773
}
774774

775775
if (dev->of_node) {
776-
version = (enum xgene_ahci_version)of_device_get_match_data(dev);
776+
version = (unsigned long)of_device_get_match_data(dev);
777777
}
778778
#ifdef CONFIG_ACPI
779779
else {

0 commit comments

Comments
 (0)