[PATCH 2/6] ata: sata_rcar: Fix compilation warning
Sergey Shtylyov
s.shtylyov at omp.ru
Mon Oct 17 12:08:56 PDT 2022
On 10/17/22 6:22 AM, Damien Le Moal wrote:
> When compiling with clang and W=1, the following warning is generated:
>
> drivers/ata/sata_rcar.c:878:15: error: cast to smaller integer type
> 'enum sata_rcar_type' from 'const void *'
> [-Werror,-Wvoid-pointer-to-enum-cast]
> priv->type = (enum sata_rcar_type)of_device_get_match_data(dev);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Fix this by using a cast to unsigned long to match the "void *" type
> size returned by of_device_get_match_data().
>
> Signed-off-by: Damien Le Moal <damien.lemoal at opensource.wdc.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov at omp.ru>
[...]
MBR, Sergey
More information about the linux-arm-kernel
mailing list