diff options
author | Steven Rostedt (Google) <rostedt@goodmis.org> | 2024-02-23 00:14:18 +0300 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2024-03-18 17:33:04 +0300 |
commit | 916849860fa9c7d3caeb144cb5dec8831cf23bfc (patch) | |
tree | 1bbb49dddab357f4e7884d1182a19c101f3b1f44 /include/linux/trace_events.h | |
parent | e8b737bfb16a0d540413173e8d1574e3bf8cc0e9 (diff) | |
download | linux-916849860fa9c7d3caeb144cb5dec8831cf23bfc.tar.xz |
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/20240222211442.949327725@goodmis.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Chuck Lever <chuck.lever@oracle.com>
Suggested-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/trace_events.h')
0 files changed, 0 insertions, 0 deletions