Re: [PATCH 2/6] ata: sata_rcar: Fix compilation warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>

Reviewed-by: Sergey Shtylyov <s.shtylyov@xxxxxx>

[...]

MBR, Sergey



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux