On Wed, 15 Jan 2014 11:49:28 +0900
Namhyung Kim <namhy...@kernel.org> wrote:

> Hi Steve,
> 
> On Tue, 14 Jan 2014 21:00:58 -0500, Steven Rostedt wrote:
> > On Wed, 15 Jan 2014 10:45:24 +0900
> > Namhyung Kim <namhy...@kernel.org> wrote:
> >
> >>  
> >> @@ -32,8 +33,9 @@
> >>  #define TRACE_SEQ_POISON  ((void *)0xdeadbeef)
> >>  #define TRACE_SEQ_CHECK(s)                                                
> >> \
> >>  do {                                                                      
> >> \
> >> -  if ((s)->buffer == TRACE_SEQ_POISON)                    \
> >> -          die("Usage of trace_seq after it was destroyed");       \
> >> +  if (WARN_ONCE((s)->buffer == TRACE_SEQ_POISON,                  \
> >> +                "Usage of trace_seq after it was destroyed"))     \
> >> +          (s)->state = TRACE_SEQ__BUFFER_POISONED;                \
> >>  } while (0)
> >>  
> >> @@ -189,9 +205,15 @@ int trace_seq_putc(struct trace_seq *s, unsigned char 
> >> c)
> >>  {
> >>    TRACE_SEQ_CHECK(s);
> >>  
> >> +  if (s->state != TRACE_SEQ__GOOD)
> >> +          return 0;
> >> +
> >
> > Instead of adding all of these, we can extend the macro
> > TRACE_SEQ_CHECK() which does a
> >     if (s->state != TRACE_SEQ__GOOD)
> >             return;
> >
> > and a TRACE_SEQ_CHECK_RET() that does a return 0;
> 
> Oh, it looks better.  But I'd like to TRACE_SEQ_CHECK() as is for some
> cases.  How about this?
> 
> 

Looks good to me.

Acked-by: Steven Rostedt <rost...@goodmis.org>

I'll try to look at the rest of the patches tomorrow.

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to