Commit 7d7b0c85 authored by Damien Le Moal's avatar Damien Le Moal

ata: ahci_brcm: Fix compilation warning

When compiling with clang and W=1, the following warning is generated:

drivers/ata/ahci_brcm.c:451:18: error: cast to smaller integer type
'enum brcm_ahci_version' from 'const void *'
[-Werror,-Wvoid-pointer-to-enum-cast]
        priv->version = (enum brcm_ahci_version)of_id->data;
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix this by using a cast to unsigned long to match the "void *" type
size of of_id->data.
Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
parent 0ffac472
...@@ -448,7 +448,7 @@ static int brcm_ahci_probe(struct platform_device *pdev) ...@@ -448,7 +448,7 @@ static int brcm_ahci_probe(struct platform_device *pdev)
if (!of_id) if (!of_id)
return -ENODEV; return -ENODEV;
priv->version = (enum brcm_ahci_version)of_id->data; priv->version = (unsigned long)of_id->data;
priv->dev = dev; priv->dev = dev;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "top-ctrl"); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "top-ctrl");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment