Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Tue, 30 Nov 2010 16:33:25 -0200 | From | Arnaldo Carvalho de Melo <> | Subject | Re: [patch 2/9] perf: Use appropriate pointer type instead of silly typecasting |
| |
Em Tue, Nov 30, 2010 at 05:49:35PM -0000, Thomas Gleixner escreveu: > There is no reason to use a struct sample_event pointer in struct sample_queue > and type cast it when flushing the queue. > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
I touched that code in a branch I'm working on, same change :-\ Well, testing the other patches, thanks!
- Arnaldo
> tools/perf/util/session.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > Index: linux-2.6-tip/tools/perf/util/session.c > =================================================================== > --- linux-2.6-tip.orig/tools/perf/util/session.c > +++ linux-2.6-tip/tools/perf/util/session.c > @@ -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; > }; > > @@ -406,7 +406,7 @@ static void flush_sample_queue(struct pe > 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); >
| ![\](/images/icornerr.gif) |