diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-10-07 15:56:56 +0200 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-11-14 19:15:11 +0100 |
commit | 80042c8f06bf5a7b87a63deaa3deb56f2cd52645 (patch) | |
tree | c4bc791a3ca9b305896189b48427488adcaa4aa7 /kernel/trace/trace_branch.c | |
parent | lib/bsearch: Use generic type for comparator function (diff) | |
download | linux-80042c8f06bf5a7b87a63deaa3deb56f2cd52645.tar.xz linux-80042c8f06bf5a7b87a63deaa3deb56f2cd52645.zip |
tracing: Use generic type for comparator function
Comparator function type, cmp_func_t, is defined in the types.h,
use it in the code.
Link: http://lkml.kernel.org/r/20191007135656.37734-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_branch.c')
-rw-r--r-- | kernel/trace/trace_branch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/trace/trace_branch.c b/kernel/trace/trace_branch.c index 3ea65cdff30d..88e158d27965 100644 --- a/kernel/trace/trace_branch.c +++ b/kernel/trace/trace_branch.c @@ -244,7 +244,7 @@ static int annotated_branch_stat_headers(struct seq_file *m) return 0; } -static inline long get_incorrect_percent(struct ftrace_branch_data *p) +static inline long get_incorrect_percent(const struct ftrace_branch_data *p) { long percent; @@ -332,10 +332,10 @@ annotated_branch_stat_next(void *v, int idx) return p; } -static int annotated_branch_stat_cmp(void *p1, void *p2) +static int annotated_branch_stat_cmp(const void *p1, const void *p2) { - struct ftrace_branch_data *a = p1; - struct ftrace_branch_data *b = p2; + const struct ftrace_branch_data *a = p1; + const struct ftrace_branch_data *b = p2; long percent_a, percent_b; |