diff --git a/drivers/staging/sep/sep_trace_events.h b/drivers/staging/sep/sep_trace_events.h index 2b053a93afe69665a46e06098d5eb9619df30534..74f4c9a2b5be361bebff0342a70c714fa880a334 100644 --- a/drivers/staging/sep/sep_trace_events.h +++ b/drivers/staging/sep/sep_trace_events.h @@ -52,6 +52,11 @@ */ #include +/* + * Since use str*cpy in header file, better to include string.h, directly. + */ +#include + /* * The TRACE_EVENT macro is broken up into 5 parts. * @@ -97,7 +102,7 @@ TRACE_EVENT(sep_func_start, ), TP_fast_assign( - strncpy(__entry->name, name, 20); + strlcpy(__entry->name, name, 20); __entry->branch = branch; ), @@ -116,7 +121,7 @@ TRACE_EVENT(sep_func_end, ), TP_fast_assign( - strncpy(__entry->name, name, 20); + strlcpy(__entry->name, name, 20); __entry->branch = branch; ), @@ -135,7 +140,7 @@ TRACE_EVENT(sep_misc_event, ), TP_fast_assign( - strncpy(__entry->name, name, 20); + strlcpy(__entry->name, name, 20); __entry->branch = branch; ),