Commit dbcf3e06 authored by Steven Rostedt (Red Hat)'s avatar Steven Rostedt (Red Hat) Committed by Steven Rostedt

RAS/tracing: Use trace_seq_buffer_ptr() helper instead of open coded

Use the helper function trace_seq_buffer_ptr() to get the current location
of the next buffer write of a trace_seq object, instead of open coding
it.

This facilitates the conversion of trace_seq to use seq_buf.
Tested-by: default avatarJiri Kosina <jkosina@suse.cz>
Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
Acked-by: default avatarBorislav Petkov <bp@suse.de>
Reviewed-by: default avatarPetr Mladek <pmladek@suse.cz>
Cc: Chen Gong <gong.chen@linux.intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 467aa1f2
...@@ -294,7 +294,7 @@ void cper_mem_err_pack(const struct cper_sec_mem_err *mem, ...@@ -294,7 +294,7 @@ void cper_mem_err_pack(const struct cper_sec_mem_err *mem,
const char *cper_mem_err_unpack(struct trace_seq *p, const char *cper_mem_err_unpack(struct trace_seq *p,
struct cper_mem_err_compact *cmem) struct cper_mem_err_compact *cmem)
{ {
const char *ret = p->buffer + p->len; const char *ret = trace_seq_buffer_ptr(p);
if (cper_mem_err_location(cmem, rcd_decode_str)) if (cper_mem_err_location(cmem, rcd_decode_str))
trace_seq_printf(p, "%s", rcd_decode_str); trace_seq_printf(p, "%s", rcd_decode_str);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment