]> Git Repo - linux.git/commit
tracing: Use ? : shortcut in trace macros
authorSteven Rostedt (Google) <[email protected]>
Thu, 22 Feb 2024 21:14:18 +0000 (16:14 -0500)
committerSteven Rostedt (Google) <[email protected]>
Mon, 18 Mar 2024 14:33:04 +0000 (10:33 -0400)
commit916849860fa9c7d3caeb144cb5dec8831cf23bfc
tree1bbb49dddab357f4e7884d1182a19c101f3b1f44
parente8b737bfb16a0d540413173e8d1574e3bf8cc0e9
tracing: Use ? : shortcut in trace macros

Instead of having:

  #define __assign_str(dst, src) \
memcpy(__get_str(dst), __data_offsets.dst##_ptr_ ? \
__data_offsets.dst##_ptr_ : "(null)", \
__get_dynamic_array_len(dst))

Use the ? : shortcut and compact it down to:

  #define __assign_str(dst, src) \
memcpy(__get_str(dst), __data_offsets.dst##_ptr_ ? : "(null)", \
       __get_dynamic_array_len(dst))

Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
Cc: Masami Hiramatsu <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Chuck Lever <[email protected]>
Suggested-by: Mathieu Desnoyers <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
include/trace/stages/stage5_get_offsets.h
include/trace/stages/stage6_event_callback.h
This page took 0.056543 seconds and 4 git commands to generate.