From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <peterz@infradead.org>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [patch 2/9] perf: Use appropriate pointer type instead of silly typecasting
Date: Tue, 30 Nov 2010 16:33:25 -0200 [thread overview]
Message-ID: <20101130183325.GB11102@ghostprotocols.net> (raw)
In-Reply-To: <20101130163819.969462809@linutronix.de>
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);
>
next parent reply other threads:[~2010-11-30 18:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20101130163735.217366493@linutronix.de>
[not found] ` <20101130163819.969462809@linutronix.de>
2010-11-30 18:33 ` Arnaldo Carvalho de Melo [this message]
2010-12-01 9:10 ` [tip:perf/core] perf session: Use appropriate pointer type instead of silly typecasting tip-bot for Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101130183325.GB11102@ghostprotocols.net \
--to=acme@redhat.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.