From: Li Zefan <lizf@cn.fujitsu.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] tracing/events: use list_for_entry_continue
Date: Mon, 21 Sep 2009 10:34:57 +0800 [thread overview]
Message-ID: <4AB6E651.6050000@cn.fujitsu.com> (raw)
In-Reply-To: <20090918150930.GB5200@nowhere>
Frederic Weisbecker wrote:
> On Fri, Sep 18, 2009 at 02:07:05PM +0800, Li Zefan wrote:
>> Simplify s_next() and t_next().
>>
>> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
>> ---
>
> Nice.
> I wonder if that can be even more simplified with
> the following existing seq helpers:
>
Unfortunately they can't be used here, at least they can't
help make code simpler, because we need to skip some list
entries.
But we can add seq_list_start_at() and seq_list_next_at(),
which take a predicate and will return an entry which matches
the predicate. I thought about it, and I can try it out.
> extern struct list_head *seq_list_start(struct list_head *head,
> loff_t pos);
> extern struct list_head *seq_list_start_head(struct list_head *head,
> loff_t pos);
> extern struct list_head *seq_list_next(void *v, struct list_head *head,
> loff_t *ppos);
>
next prev parent reply other threads:[~2009-09-21 2:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-18 6:06 [PATCH 1/3][RESEND] function-graph: use ftrace_graph_funcs directly Li Zefan
2009-09-18 6:06 ` [PATCH 2/3][RESEND] tracing: remove max_tracer_type_len Li Zefan
2009-09-18 9:00 ` Frédéric Weisbecker
2009-09-18 13:51 ` Steven Rostedt
2009-09-19 10:04 ` Ingo Molnar
2009-09-19 18:03 ` [tip:tracing/urgent] " tip-bot for Li Zefan
2009-09-18 6:07 ` [PATCH 3/3] tracing/events: use list_for_entry_continue Li Zefan
2009-09-18 15:09 ` Frederic Weisbecker
2009-09-19 15:29 ` Steven Rostedt
2009-09-21 2:34 ` Li Zefan [this message]
2009-09-21 18:47 ` Frederic Weisbecker
2009-09-19 18:04 ` [tip:tracing/urgent] " tip-bot for Li Zefan
2009-09-18 15:03 ` [PATCH 1/3][RESEND] function-graph: use ftrace_graph_funcs directly Frederic Weisbecker
2009-09-19 18:03 ` [tip:tracing/urgent] " tip-bot for Li Zefan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AB6E651.6050000@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.