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