From: "Frédéric Weisbecker" <fweisbec@gmail.com>
To: "Pekka Paalanen" <pq@iki.fi>
Cc: mingo@elte.hu, rostedt@goodmis.org, linux-kernel@vger.kernel.org
Subject: Re: [Path -tip 1/3] Tracing/ftrace: Change the type of the print_line callback
Date: Mon, 29 Sep 2008 17:56:50 +0200 [thread overview]
Message-ID: <c62985530809290856w4045c3acx8779d8a11445a14a@mail.gmail.com> (raw)
In-Reply-To: <20080929180409.68cdf8ba@daedalus.pq.iki.fi>
2008/9/29 Pekka Paalanen <pq@iki.fi>:
> On Mon, 29 Sep 2008 11:11:15 +0200
> "Frédéric Weisbecker" <fweisbec@gmail.com> wrote:
>
>> 2008/9/28 Pekka Paalanen <pq@iki.fi>:
>>
>
> [static int print_trace_line(struct trace_iterator *iter)]
>
>> > Shouldn't the return type be bool?
>> > If it's not, reading this function makes me wonder about the conversion
>> > from enum to int, i.e. what is the meaning of the int.
>>
>> Actually it should be enum print_line_t. I forgot to change its type.
>> But we need to check its return value as an enum print_line_t.
>
> Is print_line_t necessary? Does it have to return any other information than
> "this entry was handled somehow" vs. "this entry must be handled later"?
> Currently it's just a flag to say "please flush and retry".
It would just make the code more readable in the read_pipe function.
if (sret == TRACE_TYPE_PARTIAL_LINE) tells us more than if (!sret).
And it would avoid some tests to return a boolean in print_trace_line.
No?
prev parent reply other threads:[~2008-09-29 15:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-26 15:25 Frederic Weisbecker
2008-09-28 16:19 ` Pekka Paalanen
2008-09-29 9:11 ` Frédéric Weisbecker
2008-09-29 15:04 ` Pekka Paalanen
2008-09-29 15:56 ` Frédéric Weisbecker [this message]
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=c62985530809290856w4045c3acx8779d8a11445a14a@mail.gmail.com \
--to=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=pq@iki.fi \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®