diff options
author | Johannes Berg <johannes.berg@intel.com> | 2017-09-08 16:41:14 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-09-08 16:41:14 +0200 |
commit | a666844f69cc2638ef69932db5bddcece529372d (patch) | |
tree | a17154587b9e3d0cf3dd2b796672af9423461a02 /backport | |
parent | d167945e4049406e8bc0c4f432ec97684b687242 (diff) |
backports: add trace_seq_buffer_ptr() where needed
Some new code needs this, add it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'backport')
-rw-r--r-- | backport/compat/backport-4.0.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/backport/compat/backport-4.0.c b/backport/compat/backport-4.0.c index 71095f19..eb950826 100644 --- a/backport/compat/backport-4.0.c +++ b/backport/compat/backport-4.0.c @@ -324,6 +324,14 @@ overflow1: } EXPORT_SYMBOL_GPL(hex_dump_to_buffer); +#if LINUX_VERSION_IS_LESS(3,17,0) +static inline unsigned char * +trace_seq_buffer_ptr(struct trace_seq *s) +{ + return s->buffer + s->len; +} +#endif + const char * ftrace_print_array_seq(struct trace_seq *p, const void *buf, int buf_len, size_t el_size) |