Skip to content

Commit 4afc71c

Browse files
krzkdamien-lemoal
authored andcommitted
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>
1 parent 602f661 commit 4afc71c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/ata/ahci_imx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ static int imx_ahci_probe(struct platform_device *pdev)
869869
imxpriv->ahci_pdev = pdev;
870870
imxpriv->no_device = false;
871871
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);
873873

874874
imxpriv->sata_clk = devm_clk_get(dev, "sata");
875875
if (IS_ERR(imxpriv->sata_clk)) {

0 commit comments

Comments
 (0)