]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Fix smatch warning for null glob in event_hist_trigger_parse()
authorTom Zanussi <zanussi@kernel.org>
Thu, 27 Jan 2022 21:44:15 +0000 (15:44 -0600)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 28 Jan 2022 00:15:47 +0000 (19:15 -0500)
commit127ebbc56d51be15ee96483084d54ea5041b7ee6
tree1a274329363a5c7116d6f40d65408b27dbb12199
parentd09d067b423f5fb1e3f22bfef8c0af424fd44d64
tracing: Fix smatch warning for null glob in event_hist_trigger_parse()

The recent rename of event_hist_trigger_parse() caused smatch
re-evaluation of trace_events_hist.c and as a result an old warning
was found:

    kernel/trace/trace_events_hist.c:6174 event_hist_trigger_parse()
    error: we previously assumed 'glob' could be null (see line 6166)

glob should never be null (and apparently smatch can also figure that
out and skip the warning when using the cross-function DB (but which
can't be used with a 0day build as it takes too much time to
generate)).

Nonetheless for clarity, remove the test but add a WARN_ON() in case
the code ever changes.

Link: https://lkml.kernel.org/r/96925e5c1f116654ada7ea0613d930b1266b5e1c.1643319703.git.zanussi@kernel.org
Fixes: f5808f030a5da ("tracing: Add 'last error' error facility for hist triggers")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_events_hist.c