[patch 6/17] Use WARN() in mm/vmalloc.c

From: Arjan van de Ven
Date: Tue Jul 08 2008 - 12:57:51 EST


From: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
Subject: Use WARN instead of printk+WARN_ON in mm/vmalloc.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: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
---
mm/vmalloc.c | 6
2 files changed, 2 insertions(+), 309 deletions(-)

Index: linux.trees.git/mm/vmalloc.c
===================================================================
--- linux.trees.git.orig/mm/vmalloc.c
+++ linux.trees.git/mm/vmalloc.c
@@ -381,16 +381,14 @@ static void __vunmap(const void *addr, i
return;

if ((PAGE_SIZE-1) & (unsigned long)addr) {
- printk(KERN_ERR "Trying to vfree() bad address (%p)\n", addr);
- WARN_ON(1);
+ WARN(1, KERN_ERR "Trying to vfree() bad address (%p)\n", addr);
return;
}

area = remove_vm_area(addr);
if (unlikely(!area)) {
- printk(KERN_ERR "Trying to vfree() nonexistent vm area (%p)\n",
+ WARN(1, KERN_ERR "Trying to vfree() nonexistent vm area (%p)\n",
addr);
- WARN_ON(1);
return;
}


--
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/