lkml.org 
[lkml]   [2009]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] irq: handle irq0 special only on x86
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


\
 
 \ /
  Last update: 2009-12-13 02:17    [W:0.049 / U:2.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site