Re: [PATCH] irq: handle irq0 special only on x86

From: Maciej W. Rozycki
Date: Sat Dec 12 2009 - 20:12:39 EST


On Thu, 10 Dec 2009, H. Peter Anvin wrote:

> > Note, I fully agree to use 0 for NO_IRQ if you have an int-sized value
> > that holds either NO_IRQ or a valid irq number. But in practise I'd not
> > recommend to use this idiom.
> >
>
> You're tilting at windmills about something that was settled long ago,
> like it or not.

This is nothing that couldn't be changed; my personal preference would be
quite the obvious choice of something along the lines of:

#define NO_IRQ -1U

that would also have the benefit of forcing all the relevant places to use
the macro rather than an expression like !irq, improving code readability
and greppability.

My motivation to push any such change at the moment is rather weak though
-- it's been a while since I was last pissed off by the weirdness of
assumptions about IRQ 0 in Linux.

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