Skip to content

Commit c6650b2

Browse files
baihuahuarostedt
authored andcommitted
tracing: ftrace_event_is_function() can return boolean
Make ftrace_event_is_function() return bool to improve readability due to this particular function only using either one or zero as its return value. No functional change. Link: http://lkml.kernel.org/r/1443537816-5788-9-git-send-email-bywxiaobai@163.com Signed-off-by: Yaowei Bai <bywxiaobai@163.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
1 parent 907bff9 commit c6650b2

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎kernel/trace/trace.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ void ftrace_destroy_filter_files(struct ftrace_ops *ops);
873873
#define ftrace_destroy_filter_files(ops) do { } while (0)
874874
#endif /* CONFIG_FUNCTION_TRACER && CONFIG_DYNAMIC_FTRACE */
875875

876-
int ftrace_event_is_function(struct trace_event_call *call);
876+
bool ftrace_event_is_function(struct trace_event_call *call);
877877

878878
/*
879879
* struct trace_parser - servers for reading the user input separated by spaces

‎kernel/trace/trace_export.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call;
187187
FTRACE_ENTRY_REG(call, struct_name, etype, \
188188
PARAMS(tstruct), PARAMS(print), filter, NULL)
189189

190-
int ftrace_event_is_function(struct trace_event_call *call)
190+
bool ftrace_event_is_function(struct trace_event_call *call)
191191
{
192192
return call == &event_function;
193193
}

0 commit comments

Comments
 (0)