All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [patch 2/9] perf: Use appropriate pointer type instead of silly typecasting
       [not found] ` <20101130163819.969462809@linutronix.de>
@ 2010-11-30 18:33   ` Arnaldo Carvalho de Melo
  2010-12-01  9:10   ` [tip:perf/core] perf session: " tip-bot for Thomas Gleixner
  1 sibling, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-11-30 18:33 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Ingo Molnar, Peter Zijlstra, Frederic Weisbecker

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip:perf/core] perf session: Use appropriate pointer type instead of silly typecasting
       [not found] ` <20101130163819.969462809@linutronix.de>
  2010-11-30 18:33   ` [patch 2/9] perf: Use appropriate pointer type instead of silly typecasting Arnaldo Carvalho de Melo
@ 2010-12-01  9:10   ` tip-bot for Thomas Gleixner
  1 sibling, 0 replies; 2+ messages in thread
From: tip-bot for Thomas Gleixner @ 2010-12-01  9:10 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, linux-kernel, hpa, mingo, peterz, fweisbec, tglx, mingo

Commit-ID:  28990f75e66b36faf6ce56747890009d4e250243
Gitweb:     http://git.kernel.org/tip/28990f75e66b36faf6ce56747890009d4e250243
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Tue, 30 Nov 2010 17:49:35 +0000
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 30 Nov 2010 19:55:26 -0200

perf session: Use appropriate pointer type instead of silly typecasting

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>
---
 tools/perf/util/session.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index daca557..525bcf6 100644
--- a/tools/perf/util/session.c
+++ b/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 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);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-01  9:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20101130163735.217366493@linutronix.de>
     [not found] ` <20101130163819.969462809@linutronix.de>
2010-11-30 18:33   ` [patch 2/9] perf: Use appropriate pointer type instead of silly typecasting Arnaldo Carvalho de Melo
2010-12-01  9:10   ` [tip:perf/core] perf session: " tip-bot for Thomas Gleixner

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.