[patch 4/17] Use WARN() in kernel/irq/manage.c

From: Arjan van de Ven
Date: Tue Jul 08 2008 - 13:03:29 EST


From: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>

Replace a printk+WARN_ON() by a WARN(); this increases the chance of the
string making it into the bugreport (ie: it goes inside the
---[ cut here ]--- section)

Signed-off-by: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

kernel/irq/manage.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

Index: linux.trees.git/kernel/irq/manage.c
===================================================================
--- linux.trees.git.orig/kernel/irq/manage.c
+++ linux.trees.git/kernel/irq/manage.c
@@ -177,8 +177,7 @@ static void __enable_irq(struct irq_desc
{
switch (desc->depth) {
case 0:
- printk(KERN_WARNING "Unbalanced enable for IRQ %d\n", irq);
- WARN_ON(1);
+ WARN(1, KERN_WARNING "Unbalanced enable for IRQ %d\n", irq);
break;
case 1: {
unsigned int status = desc->status & ~IRQ_DISABLED;
@@ -247,9 +246,7 @@ int set_irq_wake(unsigned int irq, unsig
set_wake = NULL;
} else {
if (desc->wake_depth == 0) {
- printk(KERN_WARNING "Unbalanced IRQ %d "
- "wake disable\n", irq);
- WARN_ON(1);
+ WARN(1, "Unbalanced IRQ %d wake disable\n", irq);
} else if (--desc->wake_depth == 0)
desc->status &= ~IRQ_WAKEUP;
else
--
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/