lkml.org 
[lkml]   [2010]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][GIT PULL][v2.6.35] tracing/events: Convert format output to seq_file
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 <lizf@cn.fujitsu.com>


\
 
 \ /
  Last update: 2010-06-04 04:27    [W:0.211 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site