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>
This commit is contained in:
Andy Shevchenko
2019-10-07 16:56:56 +03:00
committed by Steven Rostedt (VMware)
parent e8877ec5db
commit 80042c8f06
4 changed files with 13 additions and 15 deletions

View File

@@ -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;