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

From: Russell King - ARM Linux
Date: Fri Dec 04 2009 - 05:38:24 EST


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?
--
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/