From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754955AbZFAIaV (ORCPT ); Mon, 1 Jun 2009 04:30:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754251AbZFAIaG (ORCPT ); Mon, 1 Jun 2009 04:30:06 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:43440 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754043AbZFAIaE (ORCPT ); Mon, 1 Jun 2009 04:30:04 -0400 Date: Mon, 1 Jun 2009 04:30:04 -0400 From: Christoph Hellwig To: Li Zefan Cc: Steven Rostedt , Frederic Weisbecker , Ingo Molnar , Christoph Hellwig , LKML Subject: Re: [PATCH 2/2] tracing/events: introduce __dynamic_array() Message-ID: <20090601083004.GB2714@infradead.org> References: <4A2384B1.90100@cn.fujitsu.com> <4A2384D2.3080403@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A2384D2.3080403@cn.fujitsu.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 01, 2009 at 03:35:46PM +0800, Li Zefan wrote: > __string() is limited: > > - it's a char array, but we may want to define array with other types > - a source string should be available, but we may just know the string size > > We introduce __dynamic_array() to break those limitations, and __string() > becomes a wrapper of it. As a side effect, now __get_str() can be used > in TP_fast_assign but not only TP_print. > > Take XFS for example, we have the string length in the dirent, but the > string itself is not NULL-terminated, so __dynamic_array() can be used: Nice one from the users POV! Thanks a lot.