[RFC][PATCH 01/10] arm: mxc: New interrupt controller (TZIC) for i.MX5 family

Russell King - ARM Linux linux at arm.linux.org.uk
Fri Dec 4 05:38:04 EST 2009


A few comments:

On Fri, Dec 04, 2009 at 04:47:01AM +0200, Amit Kucheria wrote:
> +#include <linux/module.h>
> +#include <linux/moduleparam.h>
> +#include <linux/init.h>
> +#include <linux/device.h>
> +#include <linux/errno.h>
> +#include <mach/hardware.h>
> +#include <linux/io.h>

linux/ includes all together please.

> +void __iomem *tzic_base;

static?

> +
> +/*!

This isn't kerneldoc standard.

> +static int mxc_set_wake_irq(unsigned int irq, unsigned int enable)
> +{
> +	unsigned int index, off;
> +
> +	index = irq >> 5;
> +	off = irq & 0x1F;
> +
> +	if (index > 3)
> +		return -1;

Never use -1 as an error code.  -1 is bad.  Look up in
asm-generic/errno-base.h to see what error code 1 means.

Please chose a far better error code.  Same goes for any other uses
of '-1' in this kind of context.

> +	printk(KERN_INFO "MXC IRQ initialized\n");

MXC or TZIC?



More information about the linux-arm-kernel mailing list