Re: [PATCH v6] Unified trace buffer

From: Steven Rostedt
Date: Fri Sep 26 2008 - 19:59:17 EST



On Fri, 26 Sep 2008, Arnaldo Carvalho de Melo wrote:

> Em Fri, Sep 26, 2008 at 02:05:44PM -0400, Steven Rostedt escreveu:
> > + */
> > +static inline void *
> > +ring_buffer_event_data(struct ring_buffer_event *event)
> > +{
> > + BUG_ON(event->type != RB_TYPE_DATA);
> > + /* If length is in len field, then array[0] has the data */
> > + if (event->len)
> > + return (void *)&event->array[0];
> > + /* Otherwise length is in array[0] and array[1] has the data */
> > + return (void *)&event->array[1];
>
> Nitpick: Why cast to void *?

5 day hacking marathon, I cast everything ;-)

>
> And sometimes you use the rb_ prefix, in other cases you use the longer
> for ring_buffer_, is the ring_ namespace already used? Or can we make it
> use rb_ consistently to shorten the names?

I started using the rb_ because I was constantly breaking the 80 character
line limit with ring_buffer ;-) OK, for v8, I'll rename all static
internal functions to rb_ and keep the global ones ring_buffer_

Thanks,

-- Steve

--
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/