Skip to contentSkip to conversation

kmemtrace:fix undeclared 'PAGE_SIZE' via asm/page.h

PATCH In review Wu Zhangjin 2 participants 3 messages Jun 14, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kmemtrace:fix undeclared 'PAGE_SIZE' via asm/page.h

From: Wu Zhangjin <[email protected]>

when compiling linux-mips with kmemtrace enabled, this error will be there:

include/linux/trace_seq.h:12: error: 'PAGE_SIZE' undeclared here (not in
a function)

I checked the source code and found trace_seq.h used PAGE_SIZE but not include the relative header file, so, fix it via adding the header file <asm/page.h>

this error will not be triggered in linux-x86 for there is a <asm/page.h> header file included in a certain header file. but which not means <asm/page.h> is not needed in trace_seq.h

---
 include/linux/trace_seq.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
include/linux/trace_seq.h +2 -0
index c68bccb..c134dd1 100644
@@ -3,6 +3,8 @@
 
 #include <linux/fs.h>
 
+#include <asm/page.h>
+
 /*
  * Trace sequences are used to allow a function to call several other functions
  * to create a string of data to use (up to a max of PAGE_SIZE.
Signature · 1 line
1.6.0.4
Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines · Wu Zhangjin

From: Wu Zhangjin <[email protected]>

when compiling linux-mips with kmemtrace enabled, this error will be there:

include/linux/trace_seq.h:12: error: 'PAGE_SIZE' undeclared here (not in a function)

I checked the source code and found trace_seq.h used PAGE_SIZE but not include the relative header file, so, fix it via adding the header file <asm/page.h>

Quoted 5 lines

this error will not be triggered in linux-x86 for there is a <asm/page.h> header file included in a certain header file. but which not means <asm/page.h> is not needed in trace_seq.h

This looks like a generic tracing issue, not a kmemtrace problem so the subject line needs fixing. But the change looks good to me:

#2 lore raw
Quoted 13 lines · Pekka Enberg
Quoted 12 lines · Wu Zhangjin

From: Wu Zhangjin <[email protected]>

when compiling linux-mips with kmemtrace enabled, this error will be there:

include/linux/trace_seq.h:12: error: 'PAGE_SIZE' undeclared here (not in
a function)

I checked the source code and found trace_seq.h used PAGE_SIZE but not include the relative header file, so, fix it via adding the header file <asm/page.h>

Quoted 9 lines
Quoted 5 lines

this error will not be triggered in linux-x86 for there is a <asm/page.h> header file included in a certain header file. but which not means <asm/page.h> is not needed in trace_seq.h

This looks like a generic tracing issue, not a kmemtrace problem so the subject line needs fixing. But the change looks good to me:

so, what about this subject?

ftrace: fix undeclared 'PAGE_SIZE' in include/linux/trace_seq.h

Quoted 1 line

will add it later.

thanks!
Wu Zhangjin