diff options
author | Peter Zijlstra <[email protected]> | 2013-11-06 17:42:30 +0100 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2013-11-11 12:41:34 +0100 |
commit | 838cc7b488f89ee642fd8336e8e1b620c8c3ece2 (patch) | |
tree | fddaa3f2d4a5125969707106e87112a3c4c2fd53 /tools/perf/util/trace-event-scripting.c | |
parent | 67a6de49bf545c34eb8dee99abbb92d9ea268200 (diff) |
lockdep/proc: Fix lock-time avg computation
> kernel/locking/lockdep_proc.c: In function 'seq_lock_time':
> >> kernel/locking/lockdep_proc.c:424:23: warning: comparison of distinct pointer types lacks a cast [enabled by default]
>
> 418 static void seq_lock_time(struct seq_file *m, struct lock_time *lt)
> 419 {
> 420 seq_printf(m, "%14lu", lt->nr);
> 421 seq_time(m, lt->min);
> 422 seq_time(m, lt->max);
> 423 seq_time(m, lt->total);
> > 424 seq_time(m, lt->nr ? do_div(lt->total, lt->nr) : 0);
> 425 }
My compiler refuses to actually say that; but it looks wrong in that
do_div() returns the remainder, not the divisor.
Reported-by: Fengguang Wu <[email protected]>
Tested-by: Fengguang Wu <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Davidlohr Bueso <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions