summaryrefslogtreecommitdiff
path: root/kernel/trace
diff options
context:
space:
mode:
authorYaowei Bai <bywxiaobai@163.com>2015-09-29 22:43:35 +0800
committerSteven Rostedt <rostedt@goodmis.org>2015-11-02 14:26:51 -0500
commit907bff917a659a8e50e285dc42ef51d7eaba6e62 (patch)
treecae4b9675bd7836fd8f085ef06367baa189f3bb6 /kernel/trace
parentcdb2a0a91566d413a6e4e2c57c5d341a2e1173f3 (diff)
tracing: is_legal_op() can return boolean
Make is_legal_op() 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-8-git-send-email-bywxiaobai@163.com Signed-off-by: Yaowei Bai <bywxiaobai@163.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace_events_filter.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index bd1bf184c5c9..f93a219b18da 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -973,15 +973,15 @@ static bool is_string_field(struct ftrace_event_field *field)
field->filter_type == FILTER_PTR_STRING;
}
-static int is_legal_op(struct ftrace_event_field *field, int op)
+static bool is_legal_op(struct ftrace_event_field *field, int op)
{
if (is_string_field(field) &&
(op != OP_EQ && op != OP_NE && op != OP_GLOB))
- return 0;
+ return false;
if (!is_string_field(field) && op == OP_GLOB)
- return 0;
+ return false;
- return 1;
+ return true;
}
static filter_pred_fn_t select_comparison_fn(int op, int field_size,