Use WARN() in lib/
Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes part of the warning section for better reporting/collection. In addition, one of the if() clauses collapes into the WARN() entirely now. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
f810a5cf28
commit
5cd2b459d3
@ -40,8 +40,7 @@ static void bad_io_access(unsigned long port, const char *access)
|
||||
static int count = 10;
|
||||
if (count) {
|
||||
count--;
|
||||
printk(KERN_ERR "Bad IO access at port %#lx (%s)\n", port, access);
|
||||
WARN_ON(1);
|
||||
WARN(1, KERN_ERR "Bad IO access at port %#lx (%s)\n", port, access);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user