]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ata: ahci-xgene: Fix Wvoid-pointer-to-enum-cast warning
authorKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Mon, 5 Jan 2026 14:29:47 +0000 (15:29 +0100)
committerDamien Le Moal <dlemoal@kernel.org>
Thu, 8 Jan 2026 08:43:04 +0000 (17:43 +0900)
"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>
drivers/ata/ahci_xgene.c

index 6b8844646fcd0a6de5656445baef027be362d7f2..98c99b5a8242516e0bef855b0cafb1fb84605d57 100644 (file)
@@ -773,7 +773,7 @@ static int xgene_ahci_probe(struct platform_device *pdev)
        }
 
        if (dev->of_node) {
-               version = (enum xgene_ahci_version)of_device_get_match_data(dev);
+               version = (unsigned long)of_device_get_match_data(dev);
        }
 #ifdef CONFIG_ACPI
        else {