Re: [PATCH 00/33] dyn_array and nr_irqs support v4
From: Alan Cox
Date: Thu Aug 07 2008 - 08:26:16 EST
On Wed, 06 Aug 2008 18:02:18 -0700
ebiederm@xxxxxxxxxxxx (Eric W. Biederman) wrote:
> Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> writes:
>
> > A lot of these are range checks so could be replaced by a single
> > valid_irq(irq) test.
>
> Yes. My first impression was that with NR_IRQS dead valid_irq could
> easily become. #define valid_irq(irq) ((irq) != 0)
Not really - there are lots of cases where we sanity check an IRQ passed
from user space or module parameter configuration. So we do actually need
valid_irq(irq) ((irq) > 0 && (irq) < nr_irqs)
[or relevant per arch alternatives]
Alan
--
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/