[lkml]   [2008]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 00/33] dyn_array and nr_irqs support v4
> #define valid_irq(irq) ((irq) > 0 && (irq) < nr_irqs)
> #else
> #define valid_irq(irq) ((irq) > 0)

For a sparse IRQ you might want to call an arch specific bit of C to do
the validating. Not sure that matters too much though as must user set
interrupts are ISA 8)

> anyway why 0 is invalid instead of -1U...?

So you can write the natural thing in C

if (!dev->irq)

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