Re: [PATCH 3/6] arcnet: com20020: Add com20020 io mapped version

From: Andrea Greco
Date: Mon Jun 18 2018 - 08:51:11 EST


On 06/11/2018 06:35 PM, kbuild test robot wrote:
drivers/net/arcnet/com20020-io.c:34:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
return ioread8((void *__iomem) addr + offset);
^
drivers/net/arcnet/com20020-io.c: In function 'io_arc_outb':
drivers/net/arcnet/com20020-io.c:39:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
iowrite8(value, (void *__iomem)addr + offset);
^
drivers/net/arcnet/com20020-io.c: In function 'io_arc_insb':
drivers/net/arcnet/com20020-io.c:44:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ioread8_rep((void *__iomem) (addr + offset), buffer, count);
^
drivers/net/arcnet/com20020-io.c: In function 'io_arc_outsb':
drivers/net/arcnet/com20020-io.c:49:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
iowrite8_rep((void *__iomem) (addr + offset), buffer, count);
^
drivers/net/arcnet/com20020-io.c: In function 'com20020_probe':
drivers/net/arcnet/com20020-io.c:219:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
ioaddr = (int)devm_ioremap(&pdev->dev, iores->start,
^
drivers/net/arcnet/com20020-io.c:288:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
devm_iounmap(&pdev->dev, (void __iomem *)ioaddr);
^

Is there some clean way for fix this.
Some architetture int size is 32 bit and ptr is 64, this rise warning, of spark64 compiler.
Change ioaddr type means introduce a lots of casting in all other driver.

Which is the best way for proceed ?

Andrea