]> git.baikalelectronics.ru Git - kernel.git/commit
ata: ahci_brcm: Fix compilation warning
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Fri, 14 Oct 2022 01:42:57 +0000 (10:42 +0900)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Mon, 17 Oct 2022 23:01:57 +0000 (08:01 +0900)
commit195feb2ea7a1c65396c65dc1f299d314d720d06d
tree17dfc3134af389bde82a91ad128c1308693482d8
parentdbe4fac0a9a61054639530f74cf9ca7a78346d82
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>
drivers/ata/ahci_brcm.c