Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

genirq: better warning on irqchip->set_type() failure

While I'm glad to finally see the hole fixed whereby passing an invalid
IRQ trigger type to request_irq() would be ignored, the current diagnostic
isn't quite useful. Fixed by also listing the trigger type which was
rejected.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

David Brownell and committed by
Linus Torvalds
c69ad71b 5b2becc8

+2 -1
+2 -1
kernel/irq/manage.c
··· 323 323 ret = chip->set_type(irq, flags & IRQF_TRIGGER_MASK); 324 324 325 325 if (ret) 326 - pr_err("setting flow type for irq %u failed (%pF)\n", 326 + pr_err("setting trigger mode %d for irq %u failed (%pF)\n", 327 + (int)(flags & IRQF_TRIGGER_MASK), 327 328 irq, chip->set_type); 328 329 329 330 return ret;