Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ata: ahci-imx: Fix Wvoid-pointer-to-enum-cast warning

"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@oss.qualcomm.com>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Damien Le Moal
4afc71c2 602f6612

+1 -1
+1 -1
drivers/ata/ahci_imx.c
··· 869 869 imxpriv->ahci_pdev = pdev; 870 870 imxpriv->no_device = false; 871 871 imxpriv->first_time = true; 872 - imxpriv->type = (enum ahci_imx_type)device_get_match_data(dev); 872 + imxpriv->type = (unsigned long)device_get_match_data(dev); 873 873 874 874 imxpriv->sata_clk = devm_clk_get(dev, "sata"); 875 875 if (IS_ERR(imxpriv->sata_clk)) {