Re: 2.4.27-pre2: tg3: there's no WARN_ON in 2.4
From: Marc-Christian Petersen
Date: Wed May 05 2004 - 04:08:07 EST
On Wednesday 05 May 2004 05:18, David S. Miller wrote:
Hi Dave,
> > I would rather add the simple patch to 2.4.x core, since tg3 isn't the
> > only driver that continues to be heavily used in 2.4, and thus will
> > continue to be actively maintained for a while...
> I agree, anyone cooking up a patch for this?
Like this?
ciao, Marc
--- old/include/linux/kernel.h 2004-05-04 21:48:24.000000000 +0200
+++ new/include/linux/kernel.h 2004-05-05 10:53:32.000000000 +0200
@@ -196,4 +196,11 @@ struct sysinfo {
#define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
+#define WARN_ON(condition) do { \
+ if (unlikely((condition)!=0)) { \
+ printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \
+ dump_stack(); \
+ } \
+} while (0)
+
#endif /* _LINUX_KERNEL_H */