提交 261c40c1 编写于 作者: A Arjan van de Ven 提交者: Linus Torvalds

use WARN() in kernel/irq/chip.c

Use WARN() instead of a printk+WARN_ON() pair; this way the message
becomes part of the warning section for better reporting/collection.
Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 4c8573e2
......@@ -28,8 +28,7 @@ void dynamic_irq_init(unsigned int irq)
unsigned long flags;
if (irq >= NR_IRQS) {
printk(KERN_ERR "Trying to initialize invalid IRQ%d\n", irq);
WARN_ON(1);
WARN(1, KERN_ERR "Trying to initialize invalid IRQ%d\n", irq);
return;
}
......@@ -62,8 +61,7 @@ void dynamic_irq_cleanup(unsigned int irq)
unsigned long flags;
if (irq >= NR_IRQS) {
printk(KERN_ERR "Trying to cleanup invalid IRQ%d\n", irq);
WARN_ON(1);
WARN(1, KERN_ERR "Trying to cleanup invalid IRQ%d\n", irq);
return;
}
......@@ -71,9 +69,8 @@ void dynamic_irq_cleanup(unsigned int irq)
spin_lock_irqsave(&desc->lock, flags);
if (desc->action) {
spin_unlock_irqrestore(&desc->lock, flags);
printk(KERN_ERR "Destroying IRQ%d without calling free_irq\n",
WARN(1, KERN_ERR "Destroying IRQ%d without calling free_irq\n",
irq);
WARN_ON(1);
return;
}
desc->msi_desc = NULL;
......@@ -96,8 +93,7 @@ int set_irq_chip(unsigned int irq, struct irq_chip *chip)
unsigned long flags;
if (irq >= NR_IRQS) {
printk(KERN_ERR "Trying to install chip for IRQ%d\n", irq);
WARN_ON(1);
WARN(1, KERN_ERR "Trying to install chip for IRQ%d\n", irq);
return -EINVAL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册