lkml.org 
[lkml]   [2008]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 00/33] dyn_array and nr_irqs support v4
On Wed, 06 Aug 2008 18:02:18 -0700
ebiederm@xmission.com (Eric W. Biederman) wrote:

> Alan Cox <alan@lxorguk.ukuu.org.uk> 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


\
 
 \ /
  Last update: 2008-08-07 14:33    [W:0.046 / U:2.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site