mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
tracing: Optimize trace_buffer_iter() logic
Simplify and optimize the logic in trace_buffer_iter() to use a conditional operation instead of an if conditional. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: yuan linyu <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
This commit is contained in:
parent
f90658725b
commit
f26808ba72
1 changed files with 1 additions and 3 deletions
|
|
@ -583,9 +583,7 @@ static __always_inline void trace_clear_recursion(int bit)
|
|||
static inline struct ring_buffer_iter *
|
||||
trace_buffer_iter(struct trace_iterator *iter, int cpu)
|
||||
{
|
||||
if (iter->buffer_iter && iter->buffer_iter[cpu])
|
||||
return iter->buffer_iter[cpu];
|
||||
return NULL;
|
||||
return iter->buffer_iter ? iter->buffer_iter[cpu] : NULL;
|
||||
}
|
||||
|
||||
int tracer_init(struct tracer *t, struct trace_array *tr);
|
||||
|
|
|
|||
Loading…
Reference in a new issue