lkml.org 
[lkml]   [2004]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: 2.4.27-pre2: tg3: there's no WARN_ON in 2.4
Date
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 */
\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.072 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site