Thread (5 messages) 5 messages, 3 authors, 2016-09-25

Re: powerpc: Remove all usages of NO_IRQ

From: Michael Ellerman <hidden>
Date: 2016-09-25 03:00:16

On Tue, 2016-06-09 at 11:53:24 UTC, Michael Ellerman wrote:
NO_IRQ has been == 0 on powerpc for just over ten years (since commit
0ebfff1491ef ("[POWERPC] Add new interrupt mapping core and change
platforms to use it")). It's also 0 on most other arches.

Although it's fairly harmless, every now and then it causes confusion
when a driver is built on powerpc and another arch which doesn't define
NO_IRQ. There's at least 6 definitions of NO_IRQ in drivers/, at least
some of which are to work around that problem.

So we'd like to remove it. This is fairly trivial in the arch code, we
just convert:

    if (irq == NO_IRQ)	to	if (!irq)
    if (irq != NO_IRQ)	to	if (irq)
    irq = NO_IRQ;	to	irq = 0;
    return NO_IRQ;	to	return 0;

And a few other odd cases as well.

At least for now we need to continue to #define NO_IRQ, because there is
driver code that builds on powerpc and may build on arm (and possibly
other arches), where NO_IRQ is *not* == 0. Hopefully they can be fixed
in the medium term and we can drop the definition entirely.

Note we also change some occurrences in PPC sound drivers, drivers/ps3,
and drivers/macintosh.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Applied to powerpc next.

https://git.kernel.org/powerpc/c/ef24ba7091517d2bbf9ba2cb42

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help