Re: [PATCH V2 -tip 3/4] Tracing/ftrace: Adapt mmiotrace to the newtype of print_line

From: Ingo Molnar
Date: Wed Oct 01 2008 - 04:06:44 EST



* Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:

> Subject: [PATCH -tip] Tracing/ftrace: correct return value of trace_empty
>
> Correct the value's type of trace_empty function
>
> Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
> ---
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index 6a1c76b..da3789d 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -1686,7 +1686,7 @@ static int trace_empty(struct trace_iterator *iter)
> if (!ring_buffer_iter_empty(iter->buffer_iter[cpu]))
> return 0;
> }
> - return TRACE_TYPE_HANDLED;
> + return 1;

applied the commit below to tip/tracing/ring-buffer, thanks Frederic!
(had to do manual merging due to flux in that function due to the
locking changes - please double-check that i got it right.)

btw., we still have the mmiotrace type casting buglet unfixed:

> > > struct trace_entry *entry = iter->ent;
> > > - struct mmiotrace_map *m = &entry->field.mmiomap;
> > > + struct mmiotrace_map *m = (struct mmiotrace_map *)entry;

Ingo

------------>