tracing: Hopefully the last updates for 4.13
Subsystems (3)
Steven Rostedt
maintainercover tracing: Hopefully the last updates for 4.13
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
for-next
Head SHA1: 2e028c4fe12907f226b8221815f16c2486ad3aa7
Dan Carpenter (2):
ftrace: Remove an unneeded NULL check
ftrace: Fix uninitialized variable in match_records()
----
kernel/trace/ftrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Steven Rostedt
maintainerPATCH 1/2 ftrace: Remove an unneeded NULL check
From: Dan Carpenter <[email protected]>
"func" can't be NULL and it doesn't make sense to check because we've already derefenced it.
--- kernel/trace/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/ftrace.c +1 -1
@@ -3950,7 +3950,7 @@ static int cache_mod(struct trace_array *tr,continue ;/* no func matches all */ -if (!func ||strcmp (func,"*" ) ==0 || +if (strcmp (func,"*" ) ==0 || (ftrace_mod->func &&strcmp (ftrace_mod->func, func) ==0 )) { ret =0 ;
Signature · 1 line
2.10.2
Steven Rostedt
maintainerPATCH 2/2 ftrace: Fix uninitialized variable in match_records()
In reply to Steven RostedtFrom: Dan Carpenter <[email protected]>
My static checker complains that if "func" is NULL then "clear_filter" is uninitialized. This seems like it could be true, although it's possible something subtle is happening that I haven't seen.
kernel/trace/ftrace.c:3844 match_records()
error: uninitialized symbol 'clear_filter'.
--- kernel/trace/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/ftrace.c +1 -1
@@ -3816,7 +3816,7 @@ match_records(struct ftrace_hash *hash, char *func, int len, char *mod)int exclude_mod =0 ;int found =0 ;int ret; -int clear_filter; +int clear_filter =0 ;if (func) { func_g.type = filter_parse_regex(func, len, &func_g.search,
Signature · 1 line
2.10.2