Skip to content

Commit

Permalink
perf session: Use appropriate pointer type instead of silly typecasting
Browse files Browse the repository at this point in the history
There is no reason to use a struct sample_event pointer in struct sample_queue
and type cast it when flushing the queue.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20101130163819.969462809@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Thomas Gleixner authored and Arnaldo Carvalho de Melo committed Nov 30, 2010
1 parent a1225de commit 28990f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/perf/util/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ static event__swap_op event__swap_ops[] = {

struct sample_queue {
u64 timestamp;
struct sample_event *event;
event_t *event;
struct list_head list;
};

Expand All @@ -406,7 +406,7 @@ static void flush_sample_queue(struct perf_session *s,
if (iter->timestamp > limit)
break;

ops->sample((event_t *)iter->event, s);
ops->sample(iter->event, s);

os->last_flush = iter->timestamp;
list_del(&iter->list);
Expand Down

0 comments on commit 28990f7

Please sign in to comment.