[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080708094507.4ae10e5d@infradead.org>
Date: Tue, 8 Jul 2008 09:45:07 -0700
From: Arjan van de Ven <arjan@...radead.org>
To: Arjan van de Ven <arjan@...radead.org>,
linux-kernel@...r.kernel.org
Cc: akpm@...ux-foundation.org, mingo@...e.hu
Subject: [patch 5/17] Use WARN() in kernel/panic.c
From: Arjan van de Ven <arjan@...ux.intel.com>
Subject: Use WARN instead of printk+WARN_ON in kernel/panic.c
Use WARN() instead of a printk+WARN_ON() pair; this way the message
becomes part of the warning section for better reporting/collection.
This allowed the if() to be folded entirely into the WARN()
Signed-off-by: Arjan van de Ven <arjan@...ux.intel.com>
---
kernel/panic.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Index: linux.trees.git/kernel/panic.c
===================================================================
--- linux.trees.git.orig/kernel/panic.c
+++ linux.trees.git/kernel/panic.c
@@ -392,10 +392,8 @@ static int __stack_chk_test(void)
printk(KERN_INFO "Testing -fstack-protector-all feature\n");
__stack_check_testing = (unsigned long)&__stack_chk_test_func;
__stack_chk_test_func();
- if (__stack_check_testing) {
- printk(KERN_ERR "-fstack-protector-all test failed\n");
- WARN_ON(1);
- }
+ WARN(__stack_check_testing,
+ KERN_ERR "-fstack-protector-all test failed\n");
return 0;
}
/*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists