diff mbox

[5/8] header: add __get_dynamic_array_len

Message ID 20170910221020.13067-6-hauke@hauke-m.de (mailing list archive)
State Accepted
Headers show

Commit Message

Hauke Mehrtens Sept. 10, 2017, 10:10 p.m. UTC
This was added in kernel 3.16 in commit beba4bb096201 ("tracing: Add
__get_dynamic_array_len() macro for trace events")

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/trace/ftrace.h | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/backport/backport-include/trace/ftrace.h b/backport/backport-include/trace/ftrace.h
index 5fda0ce5..2daedd55 100644
--- a/backport/backport-include/trace/ftrace.h
+++ b/backport/backport-include/trace/ftrace.h
@@ -6,4 +6,8 @@ 
 		ftrace_print_array_seq(p, array, count, el_size);	\
 	})
 
+#undef __get_dynamic_array_len
+#define __get_dynamic_array_len(field)	\
+		((__entry->__data_loc_##field >> 16) & 0xffff)
+
 #include_next <trace/ftrace.h>