There's several locations in the kernel that open code the calculation
of the next location in the trace_seq buffer. This is usually done with

  p->buffer + p->len

Instead of having this open coded, supply a helper function in the
header to do it for them. This function is called trace_seq_buffer_ptr().

Acked-by: Hannes Reinecke <h...@suse.de>
Signed-off-by: Steven Rostedt <rost...@goodmis.org>
---
 drivers/firmware/efi/cper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/cper.c b/drivers/firmware/efi/cper.c
index 5b53d61..4fd9961 100644
--- a/drivers/firmware/efi/cper.c
+++ b/drivers/firmware/efi/cper.c
@@ -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);
-- 
1.8.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to