public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] Printk kernel version in WARN_ON
@ 2007-11-17 18:15 Arjan van de Ven
  2007-11-17 18:27 ` Andrew Morton
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Arjan van de Ven @ 2007-11-17 18:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: mingo, tglx, akpm

Hi,

today, all oopses contain a version number of the kernel, which is nice
because the people who actually do bother to read the oops get this
vital bit of information always without having to ask the reporter in
another round trip.

However, WARN_ON() right now lacks this information; the patch below
adds this. This information is essential for getting people to use
their time effectively when looking at these things; in addition, it's
essential for tools that try to collect statistics about defects.

Please consider, maybe even for 2.6.24 since its so simple and
important for long term quality

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>

--- linux-2.6.24-rc3/include/asm-generic/bug.h.org	2007-11-17 09:55:00.000000000 -0800
+++ linux-2.6.24-rc3/include/asm-generic/bug.h	2007-11-17 10:11:23.000000000 -0800
@@ -2,6 +2,7 @@
 #define _ASM_GENERIC_BUG_H
 
 #include <linux/compiler.h>
+#include <linux/utsrelease.h>
 
 #ifdef CONFIG_BUG
 
@@ -35,8 +36,8 @@ struct bug_entry {
 #define WARN_ON(condition) ({						\
 	int __ret_warn_on = !!(condition);				\
 	if (unlikely(__ret_warn_on)) {					\
-		printk("WARNING: at %s:%d %s()\n", __FILE__,		\
-			__LINE__, __FUNCTION__);			\
+		printk("WARNING: at %s:%d %s()  (%s)\n", __FILE__,	\
+			__LINE__, __FUNCTION__, UTS_RELEASE);		\
 		dump_stack();						\
 	}								\
 	unlikely(__ret_warn_on);					\


-- 
If you want to reach me at my work email, use arjan@linux.intel.com
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-11-21 12:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-17 18:15 [patch] Printk kernel version in WARN_ON Arjan van de Ven
2007-11-17 18:27 ` Andrew Morton
2007-11-17 18:39   ` Arjan van de Ven
2007-11-17 18:46     ` Andrew Morton
2007-11-17 19:35       ` Arjan van de Ven
2007-11-17 19:42         ` Sam Ravnborg
2007-11-21 12:51           ` Pavel Machek
2007-11-18  0:42         ` Ingo Molnar
2007-11-18  0:57           ` Andrew Morton
2007-11-18  1:04             ` Ingo Molnar
2007-11-18 17:18             ` Arjan van de Ven
2007-11-17 19:28 ` Sam Ravnborg
2007-11-17 23:02 ` Denys Vlasenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox