[PATCH 06/13] ARM: LPC32XX: Core architecture files

Kevin Wells kevin.wells at nxp.com
Thu Jan 28 14:54:38 EST 2010


> > +	{
> > +		.inp_state	= (void __iomem *) GPIO_P3_INP_STATE(GPIOBASE),
> > +		.outp_set	= (void __iomem *) GPIO_P3_OUTP_SET(GPIOBASE),
> > +		.outp_clr	= (void __iomem *) GPIO_P3_OUTP_CLR(GPIOBASE),
> > +		.dir_set	= (void __iomem *) GPIO_P2_DIR_SET(GPIOBASE),
> > +		.dir_clr	= (void __iomem *) GPIO_P2_DIR_CLR(GPIOBASE),
> > +	},
> > +};
> 
> All this casting is pretty ugly.
> 
> It appears these GPIO_P* macros are only used here.  Can the macros
> be modified to create the (void __iomem *) directly?
> 
> BTW, you might need to add __force in order to keep sparse happy.
> 
> Also, a general comment on the global names in
> arch/arm/mach-lpc32xx/include/mach/platform.h.
> 
> You might consider adding something like LPC32XX_ to the front of
> all the defines. Names like GPIO_BASE or UART3_BASE could very well
> conflict with some other piece of code in the future.
> 

Thank you for helping review these. I'll look at the use of __force
and update the necessary arch files with your other review comments.




More information about the linux-arm-kernel mailing list