Re: [PATCH 24/24] net: seeq: use __iomem pointers for MMIO

From: Arnd Bergmann
Date: Tue Sep 18 2012 - 04:32:56 EST


On Saturday 15 September 2012, David Miller wrote:
> From: Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx>
> Date: Sat, 15 Sep 2012 00:56:07 +0100
>
> > On Fri, Sep 14, 2012 at 11:34:52PM +0200, Arnd Bergmann wrote:
> >> ARM is moving to stricter checks on readl/write functions,
> >> so we need to use the correct types everywhere.
> >
> > Same comment as for eesox. const void __iomem * is not a problem on
> > x86, so it should not be a problem on ARM.
>
> Agreed.

As discussed in the thread for the same patch on the scsi eesox driver,
x86 allows reads on const __iomem pointers, but not writes, and the patch
to asm/io.h that Russell has queued up changes ARM to do the same.

My patch on seeq/ether3.c is still needed to avoid this warning in
linux-next:

drivers/net/ethernet/seeq/ether3.c: In function 'ether3_outb':
drivers/net/ethernet/seeq/ether3.c:104:2: error: passing argument 2 of '__raw_writeb' discards 'const' qualifier from pointer target type
arch/arm/include/asm/io.h:81:91: note: expected 'volatile void *' but argument is of type 'const void *'

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/