Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tracing: Add WARN_ON_ONCE when returned value is negative

ret is assigned return value of event_hist_trigger_func, but the value
is unused. It is better to warn when returned value is negative,
rather than just ignoring it.

Link: https://lkml.kernel.org/r/20210529061423.GA103954@hyeyoo

Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

authored by

Hyeonggon Yoo and committed by
Steven Rostedt (VMware)
6c610dba 099dcc18

+1
+1
kernel/trace/trace_events_hist.c
··· 5232 5232 cmd = hist_data->field_var_hists[i]->cmd; 5233 5233 ret = event_hist_trigger_func(&trigger_hist_cmd, file, 5234 5234 "!hist", "hist", cmd); 5235 + WARN_ON_ONCE(ret < 0); 5235 5236 } 5236 5237 } 5237 5238