[PATCH 3/6] ata: ahci_brcm: Fix compilation warning
Florian Fainelli
f.fainelli at gmail.com
Mon Oct 17 12:57:39 PDT 2022
On 10/16/22 20:22, Damien Le Moal wrote:
> 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 at opensource.wdc.com>
Acked-bby: Florian Fainelli <f.fainelli at gmail.com>
--
Florian
More information about the linux-arm-kernel
mailing list