ftrace: Use true and false for boolean values
PATCH 1/1 ftrace: Use true and false for boolean values
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.
Signed-off-by Gustavo A. R. Silva <[email protected]>
--- kernel/trace/ftrace.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
kernel/trace/ftrace.c +5 -5
@@ -2927,22 +2927,22 @@ ops_references_rec(struct ftrace_ops *ops, struct dyn_ftrace *rec) {/* If ops isn't enabled, ignore it */ if (!(ops->flags &FTRACE_OPS_FL_ENABLED )) -return 0 ; +return false;/* If ops traces all then it includes this function */ if (ops_traces_mod (ops)) -return 1 ; +return true;/* The function must be in the filter */ if (!ftrace_hash_empty (ops->func_hash->filter_hash) && !__ftrace_lookup_ip (ops->func_hash->filter_hash, rec->ip)) -return 0 ; +return false;/* If in notrace hash, we ignore it too */ if (ftrace_lookup_ip (ops->func_hash->notrace_hash, rec->ip)) -return 0 ; +return false; -return 1 ; +return true; }static int ftrace_update_code (struct module *mod,struct ftrace_page *new_pgs)
Signature · 1 line
2.7.4
Quoted 6 lines · On Wed, 1 Aug 2018 20:00:56 -0500 "Gustavo A. R. Silva"…
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.
Signed-off-by Gustavo A. R. Silva <[email protected]>
Thanks, applied.
-- Steve