[PATCH 10/16] ARM: LPC32XX: Converted most register types to void __iomem *

Russell King - ARM Linux linux at arm.linux.org.uk
Wed Feb 3 05:18:02 EST 2010


On Tue, Feb 02, 2010 at 03:59:22PM -0800, wellsk40 at gmail.com wrote:
> diff --git a/arch/arm/mach-lpc32xx/include/mach/platform.h b/arch/arm/mach-lpc32xx/include/mach/platform.h
> index adc932b..93541f4 100644
> --- a/arch/arm/mach-lpc32xx/include/mach/platform.h
> +++ b/arch/arm/mach-lpc32xx/include/mach/platform.h
> @@ -23,6 +23,8 @@
>  #ifndef __ASM_ARCH_PLATFORM_H
>  #define __ASM_ARCH_PLATFORM_H
>  
> +#define IOMEM(x, y)			(__force void __iomem *)((x) + (y))

Hmm, I'd prefer if this wasn't soo different from the definitions found
in other platforms - so maybe one day we can move this to the arch level.

The best definition for it is:

#define IOMEM(x) ((void __iomem *)(unsigned long)(x))

which I believe avoids sparse complaints without having to resort to
__force.



More information about the linux-arm-kernel mailing list