diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 1cc2265caa52..21250056b7da 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -363,7 +363,7 @@ ftrace_define_fields_##call(struct ftrace_event_call *event_call)	\
 #define __dynamic_array(type, item, len)				\
 	__data_offsets->item = __data_size +				\
 			       offsetof(typeof(*entry), __data);	\
-	__data_offsets->item |= (len * sizeof(type)) << 16;		\
+	__data_offsets->item |= ((len) * sizeof(type)) << 16;		\
 	__data_size += (len) * sizeof(type);
 
 #undef __string