Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932247Ab0FDCX7 (ORCPT ); Thu, 3 Jun 2010 22:23:59 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:51967 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S932071Ab0FDCX6 (ORCPT ); Thu, 3 Jun 2010 22:23:58 -0400 Message-ID: <4C086452.1070005@cn.fujitsu.com> Date: Fri, 04 Jun 2010 10:26:26 +0800 From: Li Zefan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2 MIME-Version: 1.0 To: rostedt@goodmis.org CC: LKML , Ingo Molnar , Frederic Weisbecker , "Martin K. Petersen" , Kei Tokunaga , James Bottomley , Tomohiro Kusumi , Xiao Guangrong Subject: Re: [PATCH][GIT PULL][v2.6.35] tracing/events: Convert format output to seq_file References: <1275594103.15884.35.camel@gandalf.stny.rr.com> <4C0860DE.5020609@cn.fujitsu.com> <1275617591.15884.67.camel@gandalf.stny.rr.com> In-Reply-To: <1275617591.15884.67.camel@gandalf.stny.rr.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 945 Lines: 32 Steven Rostedt wrote: > On Fri, 2010-06-04 at 10:11 +0800, Li Zefan wrote: >>> +static void *f_start(struct seq_file *m, loff_t *pos) >>> +{ >>> + loff_t l = 1; >>> + void *p; >>> + >>> + /* Start by showing the header */ >>> + if (!*pos) { >>> + (*pos)++; >> We shoudn't increment *pos in start() handler. It's a common mistake when >> using seqfile. > > And a common mistake I do :-p > > I'll rebase it with the fix. > >> What we need to do in start() is move the pointer to postion *pos. > > So the rest is OK then? All that is needed is the removal of *pos++ ? > I think you should also change "loff_t l = 1" to "loff_t l = 0". :) Otherwise: Reviewed-by: Li Zefan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/