msm: adsprpc: Use memcpy for trace events in LE
LE static analysis KW is giving error from fastrpc traces because traces are using __assign_str() which translates to strcpy() and this is a deprecated API. Kernel team suggested to use memcpy instead of __assign_str(). Change-Id: Idf92446a26d8b6f472963e9215f738df3f6fcdef
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
a2f9f978b1
commit
cb7a1b4f73
@@ -381,7 +381,12 @@ TRACE_EVENT(fastrpc_msg,
|
|||||||
TP_ARGS(message),
|
TP_ARGS(message),
|
||||||
TP_STRUCT__entry(__string(buf, message)),
|
TP_STRUCT__entry(__string(buf, message)),
|
||||||
TP_fast_assign(
|
TP_fast_assign(
|
||||||
|
#if IS_ENABLED(CONFIG_MSM_ADSPRPC_TRUSTED)
|
||||||
|
memcpy(__get_str(buf), (message), (sizeof(message) - 1));
|
||||||
|
__get_str(buf)[sizeof(message) - 1] = '\0';
|
||||||
|
#else
|
||||||
__assign_str(buf, message);
|
__assign_str(buf, message);
|
||||||
|
#endif
|
||||||
),
|
),
|
||||||
TP_printk(" %s", __get_str(buf))
|
TP_printk(" %s", __get_str(buf))
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user