]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Use this_cpu_ptr per-cpu helper
authorShan Wei <davidshan@tencent.com>
Tue, 13 Nov 2012 01:53:04 +0000 (09:53 +0800)
committerSteven Rostedt <rostedt@goodmis.org>
Mon, 21 Jan 2013 18:22:30 +0000 (13:22 -0500)
commit998685cd67c0da002f3a0c251d79a97da2a6c966
treeca9bd84c3629bc166f407c34055eb809e416d430
parentdae03b284373ae96ed3a932b4cabd78d355d1c6a
tracing: Use this_cpu_ptr per-cpu helper

typeof(&buffer) is a pointer to array of 1024 char, or char (*)[1024].
But, typeof(&buffer[0]) is a pointer to char which match the return type of get_trace_buf().
As well-known, the value of &buffer is equal to &buffer[0].
so return this_cpu_ptr(&percpu_buffer->buffer[0]) can avoid type cast.

Link: http://lkml.kernel.org/r/50A1A800.3020102@gmail.com
Reviewed-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Shan Wei <davidshan@tencent.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/blktrace.c
kernel/trace/trace.c