RAS/tracing: Use trace_seq_buffer_ptr() helper instead of open coded
authorSteven Rostedt (Red Hat) <[email protected]>
Fri, 31 Oct 2014 23:43:08 +0000 (19:43 -0400)
committerSteven Rostedt <[email protected]>
Wed, 19 Nov 2014 20:25:37 +0000 (15:25 -0500)
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: Jiri Kosina <[email protected]>
Acked-by: Jiri Kosina <[email protected]>
Acked-by: Borislav Petkov <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Cc: Chen Gong <[email protected]>
Cc: Tony Luck <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
drivers/firmware/efi/cper.c

index 5b53d6183b6ba85f98d1b554fa6a1868a7f7004d..4fd9961d552e8a0c12604f1cfef83f2e15bea66d 100644 (file)
@@ -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,
                                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))
                trace_seq_printf(p, "%s", rcd_decode_str);