projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cdb2a0a
)
tracing: is_legal_op() can return boolean
author
Yaowei Bai
<bywxiaobai@163.com>
Tue, 29 Sep 2015 14:43:35 +0000
(22:43 +0800)
committer
Steven Rostedt
<rostedt@goodmis.org>
Mon, 2 Nov 2015 19:26:51 +0000
(14:26 -0500)
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>
kernel/trace/trace_events_filter.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/trace/trace_events_filter.c
b/kernel/trace/trace_events_filter.c
index bd1bf184c5c98b6cc36d5c7e183bd4698702a514..f93a219b18daaa92ed314ad7ac4ba8e0ed3c4c09 100644
(file)
--- 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,