powerpc: Remove all usages of NO_IRQ

Michael Ellerman patch-notifications at ellerman.id.au
Sun Sep 25 13:00:15 AEST 2016


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 at ellerman.id.au>

Applied to powerpc next.

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

cheers


More information about the Linuxppc-dev mailing list