[PATCH 2/3] ata: ahci-imx: Fix Wvoid-pointer-to-enum-cast warning
Krzysztof Kozlowski
krzysztof.kozlowski at oss.qualcomm.com
Fri Jan 2 04:50:42 PST 2026
"imxpriv->type" is an enum, thus cast of pointer on 64-bit compile test
with clang W=1 causes:
ahci_imx.c:872:18: error: cast to smaller integer type 'enum ahci_imx_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski at oss.qualcomm.com>
---
drivers/ata/ahci_imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c
index 86aedd5923ac..3d26595524d3 100644
--- a/drivers/ata/ahci_imx.c
+++ b/drivers/ata/ahci_imx.c
@@ -869,7 +869,7 @@ static int imx_ahci_probe(struct platform_device *pdev)
imxpriv->ahci_pdev = pdev;
imxpriv->no_device = false;
imxpriv->first_time = true;
- imxpriv->type = (enum ahci_imx_type)device_get_match_data(dev);
+ imxpriv->type = (unsigned long)device_get_match_data(dev);
imxpriv->sata_clk = devm_clk_get(dev, "sata");
if (IS_ERR(imxpriv->sata_clk)) {
--
2.51.0
More information about the linux-arm-kernel
mailing list