[PATCH v2 1/7] ARM: mmp: parse irq from DT

Russell King - ARM Linux linux at arm.linux.org.uk
Mon Aug 1 04:26:50 EDT 2011


On Thu, Jul 28, 2011 at 02:41:27PM +0800, Haojian Zhuang wrote:
> +	unsigned int status, mask, irq_base, nr, data;
> +	int cascade;
> +
...
> +		mux_info = kzalloc(sizeof(*mux_info), GFP_KERNEL);
> +		if (mux_info == NULL)
> +			goto out;
> +		status += (unsigned int)mmp_info->virt_base;
> +		mux_info->status = (void __iomem *)status;

This is silly.  Why not just do:

		mux_info->status = mmp_info->virt_base + status;

and avoid those horrible casts?



More information about the linux-arm-kernel mailing list