From: Michael Ellerman <patch-notifications@ellerman•id.au>
To: Michael Ellerman <mpe@ellerman•id.au>, linuxppc-dev@ozlabs•org
Subject: Re: powerpc: Remove all usages of NO_IRQ
Date: Sun, 25 Sep 2016 13:00:15 +1000 (AEST) [thread overview]
Message-ID: <3shX000hWqz9t0P@ozlabs.org> (raw)
In-Reply-To: <1473162804-6802-1-git-send-email-mpe@ellerman.id.au>
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
prev parent reply other threads:[~2016-09-25 3:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-06 11:53 [PATCH] powerpc: Remove all usages of NO_IRQ Michael Ellerman
2016-09-06 14:22 ` Arnd Bergmann
2016-09-08 9:16 ` Michael Ellerman
2016-09-08 9:28 ` Arnd Bergmann
2016-09-25 3:00 ` Michael Ellerman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3shX000hWqz9t0P@ozlabs.org \
--to=patch-notifications@ellerman$(echo .)id.au \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=mpe@ellerman$(echo .)id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox