]> git.karo-electronics.de Git - karo-tx-linux.git/commit
genirq: correct fuzzy and fragile IRQ_RETVAL() definition
authorGeert Uytterhoeven <geert@linux-m68k.org>
Tue, 5 Nov 2013 05:54:53 +0000 (16:54 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 5 Nov 2013 05:54:53 +0000 (16:54 +1100)
commit7ac9df731266257a06da62dee3b91cde775fa980
tree2bfbbcfa8ae51a4b5f40567f69c42828e415d693
parent9ec67ee2cfb0b6fc7a0d9df3d2602e52d22a5be0
genirq: correct fuzzy and fragile IRQ_RETVAL() definition

commit bedd30d986a0 ("genirq: make irqreturn_t an enum") blindly replaced
"0" by "IRQ_NONE" in the "IRQ_RETVAL(x)" macro definition.

However, as "x" is a condition, "0" meant "boolean false", not an
irqreturn_t value.

All of this worked, and kept working after the addition of IRQ_WAKE_THREAD,
as
  - both "boolean false" and "IRQ_NONE" are "0" (for the comparison),
  - "boolean true" and "boolean false" nicely map to the correct values of
    "IRQ_HANDLED" and "IRQ_NONE" (for the return value).

Correct the macro definition for clarity and future-proofness.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/irqreturn.h