Re: [RFC][PATCH 12/23 v4] tracing: Remove return values of most trace_seq_*() functions

From: Steven Rostedt
Date: Fri Nov 14 2014 - 09:53:46 EST


On Fri, 14 Nov 2014 14:17:28 +0100
Petr Mladek <pmladek@xxxxxxx> wrote:

> > -int trace_seq_putmem_hex(struct trace_seq *s, const void *mem,
> > +void trace_seq_putmem_hex(struct trace_seq *s, const void *mem,
> > unsigned int len)
> > {
> > unsigned char hex[HEX_CHARS];
> > const unsigned char *data = mem;
> > unsigned int start_len;
> > int i, j;
> > - int cnt = 0;
> >
> > if (s->full)
> > - return 0;
> > + return;
> >
> > while (len) {
> > start_len = min(len, HEX_CHARS - 1);
> > @@ -334,10 +297,7 @@ int trace_seq_putmem_hex(struct trace_seq *s, const void *mem,
> > /* j increments twice per loop */
> > len -= j / 2;
> > hex[j++] = ' ';
> > -
> > - cnt += trace_seq_putmem(s, hex, j);
>
> trace_seq_putmem(s, hex, j); should stay ;-)

Ouch! Looks like I got a little happy with the delete line key stroke.

Good catch!

Thanks,

-- Steve

>
> Best Regards,
> Petr
>
> > }
> > - return cnt;
> > }
> > EXPORT_SYMBOL_GPL(trace_seq_putmem_hex);
> >
> > --
> > 2.1.1
> >
> >
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/