Skip to content
Commit d8a0349c authored by Shan Wei's avatar Shan Wei Committed by Steven Rostedt
Browse files

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: default avatarChristoph Lameter <cl@linux.com>
Signed-off-by: default avatarShan Wei <davidshan@tencent.com>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 771e0384
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment