Fix PARAM macro definition conflict between tracepoints and kdb.
tracepoint.h and ascidecl.h introduce incompatible versions of
the PARAMS() macro. Fix by renaming the version and usages in
tracepoint.h to TRACE_PARAMS().
Normally a patch like this would change the definition in the
file introduced by kdb, ascidecl.h. However, ascidecl.h appears
to be a standards conforming userspace file adapted to kernel
use, so I was reluctant change it. Also, there was only one
user of the tracepoint.h version.
Symptoms:
When both tracepoint.h and ascidecl.h are including in a .c
file, one gets compilation errors of the form:
In file included from include/trace/events/kmem.h:5,
from include/linux/kmemtrace.h:12,
from include/linux/slab_def.h:17,
from include/linux/slab.h:166,
from include/linux/percpu.h:5,
from include/linux/sched.h:75,
from include/linux/kdb.h:16,
from arch/x86/kdb/x86-dis.c:44:
include/linux/tracepoint.h:159:1: warning: "PARAMS" redefined
In file included from
/typhoon/jak/2.6.31-rc2/arch/x86/include/asm/ansidecl.h:4,
from include/linux/dis-asm.h:42,
from arch/x86/kdb/x86-dis.c:43:
arch/x86/include/asm/ansidecl_64.h:161:1: warning:
this is the location of the previous definition
Signed-off-by: Joe Korty <[email protected]>
Index: 2.6.31.3-kdb/include/linux/tracepoint.h
===================================================================
--- 2.6.31.3-kdb.orig/include/linux/tracepoint.h 2009-10-12
11:05:01.000000000 -0400
+++ 2.6.31.3-kdb/include/linux/tracepoint.h 2009-10-12 11:06:55.000000000
-0400
@@ -156,7 +156,7 @@
synchronize_sched();
}
-#define PARAMS(args...) args
+#define TRACE_PARAMS(args...) args
#ifndef TRACE_EVENT
/*
@@ -262,7 +262,7 @@
*/
#define TRACE_EVENT(name, proto, args, struct, assign, print) \
- DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
+ DECLARE_TRACE(name, TRACE_PARAMS(proto), TRACE_PARAMS(args))
#endif
#endif
_______________________________________________
kdb mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/kdb