Re: [patch 2.6.26-git] genirq: better warning on irqchip->set_type() failure

From: David Brownell
Date: Fri Jul 25 2008 - 15:02:28 EST


From: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxxxxxxxx>
Acked-by: Uwe Kleine-König <Uwe.Kleine-Koenig@xxxxxxxx>
---
Minor change: cast trigger mode to int, one compiler warned.

kernel/irq/manage.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- a/kernel/irq/manage.c 2008-07-25 02:07:05.000000000 -0700
+++ b/kernel/irq/manage.c 2008-07-25 02:08:13.000000000 -0700
@@ -326,7 +326,8 @@ static int __irq_set_trigger(struct irq_
ret = chip->set_type(irq, flags & IRQF_TRIGGER_MASK);

if (ret)
- pr_err("setting flow type for irq %u failed (%pF)\n",
+ pr_err("setting trigger mode %d for irq %u failed (%pF)\n",
+ (int)(flags & IRQF_TRIGGER_MASK),
irq, chip->set_type);

return ret;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/