Re: [PATCH v3 7/9] trace: use this_cpu_ptr per-cpu helper

2012-11-11 Thread Shan Wei
Christoph Lameter said, at 2012/11/10 4:15: > On Fri, 9 Nov 2012, Shan Wei wrote: > >> -return buffer->buffer; >> +return (char *)this_cpu_ptr(&percpu_buffer->buffer); >> } > > Add a comment to explain the cast? typeof(&buffer) is a pointer to array of 1024 char, or char (*)[1024]. But,

Re: [PATCH v3 7/9] trace: use this_cpu_ptr per-cpu helper

2012-11-09 Thread Christoph Lameter
On Fri, 9 Nov 2012, Shan Wei wrote: > - return buffer->buffer; > + return (char *)this_cpu_ptr(&percpu_buffer->buffer); > } Add a comment to explain the cast? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org

[PATCH v3 7/9] trace: use this_cpu_ptr per-cpu helper

2012-11-08 Thread Shan Wei
From: Shan Wei Signed-off-by: Shan Wei --- v3: directly return member address of per-cpu variable. --- kernel/trace/blktrace.c |2 +- kernel/trace/trace.c|5 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c ind