From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753292AbYIZWdp (ORCPT ); Fri, 26 Sep 2008 18:33:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751983AbYIZWdh (ORCPT ); Fri, 26 Sep 2008 18:33:37 -0400 Received: from mx2.redhat.com ([66.187.237.31]:32881 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751730AbYIZWdg (ORCPT ); Fri, 26 Sep 2008 18:33:36 -0400 Date: Fri, 26 Sep 2008 19:31:29 -0300 From: Arnaldo Carvalho de Melo To: Steven Rostedt Cc: LKML , Ingo Molnar , Thomas Gleixner , Peter Zijlstra , Andrew Morton , prasad@linux.vnet.ibm.com, Linus Torvalds , Mathieu Desnoyers , "Frank Ch. Eigler" , David Wilder , hch@lst.de, Martin Bligh , Christoph Hellwig , Masami Hiramatsu , Steven Rostedt Subject: Re: [PATCH v6] Unified trace buffer Message-ID: <20080926223129.GF15446@ghostprotocols.net> Mail-Followup-To: Arnaldo Carvalho de Melo , Steven Rostedt , LKML , Ingo Molnar , Thomas Gleixner , Peter Zijlstra , Andrew Morton , prasad@linux.vnet.ibm.com, Linus Torvalds , Mathieu Desnoyers , "Frank Ch. Eigler" , David Wilder , hch@lst.de, Martin Bligh , Christoph Hellwig , Masami Hiramatsu , Steven Rostedt References: <20080925185154.230259579@goodmis.org> <20080925185236.244343232@goodmis.org> <48DC406D.1050508@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://oops.ghostprotocols.net:81/blog User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 *? 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? - Arnaldo