diff options
author | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2022-10-14 04:42:57 +0300 |
---|---|---|
committer | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2022-10-18 02:01:57 +0300 |
commit | 7d7b0c85127cbac45e6c4e0ae0647ace17cadfaf (patch) | |
tree | 17dfc3134af389bde82a91ad128c1308693482d8 | |
parent | 0ffac4727eec1879305c1bda07c0195197937bb2 (diff) | |
download | linux-7d7b0c85127cbac45e6c4e0ae0647ace17cadfaf.tar.xz |
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: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-rw-r--r-- | drivers/ata/ahci_brcm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/ahci_brcm.c b/drivers/ata/ahci_brcm.c index f61795c546cf..6f216eb25610 100644 --- a/drivers/ata/ahci_brcm.c +++ b/drivers/ata/ahci_brcm.c @@ -448,7 +448,7 @@ static int brcm_ahci_probe(struct platform_device *pdev) if (!of_id) return -ENODEV; - priv->version = (enum brcm_ahci_version)of_id->data; + priv->version = (unsigned long)of_id->data; priv->dev = dev; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "top-ctrl"); |