[PATCH v2 05/10] kernel: cobalt: trace: replace dummy array with field

roman.stratiienko at globallogic.com roman.stratiienko at globallogic.com
Wed Mar 6 18:53:26 CET 2019

From: Roman Stratiienko <roman.stratiienko at globallogic.com>

After kernel v4.18 commit 4a0772cf0674
("tracing: Prevent further users of zero size static arrays in trace events")
creating zero length arrays will force compile-time error

This will fix BUILD_BUG_ON error on v4.18 and later

Signed-off-by: Roman Stratiienko <roman.stratiienko at globallogic.com>
Since v1: Changed to __field
 kernel/cobalt/trace/cobalt-posix.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cobalt/trace/cobalt-posix.h b/kernel/cobalt/trace/cobalt-posix.h
index 77392e725..910ef876a 100644
--- a/kernel/cobalt/trace/cobalt-posix.h
+++ b/kernel/cobalt/trace/cobalt-posix.h
@@ -266,7 +266,7 @@ DECLARE_EVENT_CLASS(cobalt_void,
 	TP_PROTO(int dummy),
-		__array(char, dummy, 0)
+		__field(int, dummy)

More information about the Xenomai mailing list