diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2018-08-01 21:00:56 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-08-01 21:15:31 -0400 |
commit | 44ec3ec01fb7d54d1a14c138cb43b90a0e934b89 (patch) | |
tree | 6d0fac3b2ae70e3dd3db48ba0711c26d799624f8 /kernel/trace/ftrace.c | |
parent | d7224c0e128c7337c0b0f66ac20921fbbf4efc14 (diff) |
ftrace: Use true and false for boolean values in ops_references_rec()
Return statements in functions returning bool should use true or false
instead of an integer value.
This code was detected with the help of Coccinelle.
Link: http://lkml.kernel.org/r/20180802010056.GA31012@embeddedor.com
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r-- | kernel/trace/ftrace.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 0d380a98a880..2d795193024b 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -2898,22 +2898,22 @@ ops_references_rec(struct ftrace_ops *ops, struct dyn_ftrace *rec) | |||
2898 | { | 2898 | { |
2899 | /* If ops isn't enabled, ignore it */ | 2899 | /* If ops isn't enabled, ignore it */ |
2900 | if (!(ops->flags & FTRACE_OPS_FL_ENABLED)) | 2900 | if (!(ops->flags & FTRACE_OPS_FL_ENABLED)) |
2901 | return 0; | 2901 | return false; |
2902 | 2902 | ||
2903 | /* If ops traces all then it includes this function */ | 2903 | /* If ops traces all then it includes this function */ |
2904 | if (ops_traces_mod(ops)) | 2904 | if (ops_traces_mod(ops)) |
2905 | return 1; | 2905 | return true; |
2906 | 2906 | ||
2907 | /* The function must be in the filter */ | 2907 | /* The function must be in the filter */ |
2908 | if (!ftrace_hash_empty(ops->func_hash->filter_hash) && | 2908 | if (!ftrace_hash_empty(ops->func_hash->filter_hash) && |
2909 | !__ftrace_lookup_ip(ops->func_hash->filter_hash, rec->ip)) | 2909 | !__ftrace_lookup_ip(ops->func_hash->filter_hash, rec->ip)) |
2910 | return 0; | 2910 | return false; |
2911 | 2911 | ||
2912 | /* If in notrace hash, we ignore it too */ | 2912 | /* If in notrace hash, we ignore it too */ |
2913 | if (ftrace_lookup_ip(ops->func_hash->notrace_hash, rec->ip)) | 2913 | if (ftrace_lookup_ip(ops->func_hash->notrace_hash, rec->ip)) |
2914 | return 0; | 2914 | return false; |
2915 | 2915 | ||
2916 | return 1; | 2916 | return true; |
2917 | } | 2917 | } |
2918 | 2918 | ||
2919 | static int ftrace_update_code(struct module *mod, struct ftrace_page *new_pgs) | 2919 | static int ftrace_update_code(struct module *mod, struct ftrace_page *new_pgs) |