From: "Frédéric Weisbecker" <fweisbec@gmail.com>
To: "Ingo Molnar" <mingo@elte.hu>
Cc: "Pekka Paalanen" <pq@iki.fi>,
linux-kernel@vger.kernel.org, rostedt@goodmis.org
Subject: Re: A style question: repeated return value check
Date: Tue, 30 Sep 2008 10:48:04 +0200 [thread overview]
Message-ID: <c62985530809300148n585327b3w8290b7761063fbd7@mail.gmail.com> (raw)
In-Reply-To: <20080930083352.GA10374@elte.hu>
2008/9/30 Ingo Molnar <mingo@elte.hu>:
> in this particular case it's marginally worse style i think, even
> considering that it makes the code more compact. The reason is that it
> makes the code a tiny bit less obvious: the flow looks a bit unusual and
> when skimming it i'd have to look once more to understand its purpose.
> With the returns its more verbose but also plain obvious. YMMV.
I think the same. The code flow seems to me more natural as is even if
it looks more
noisy.
IMHO, when one is reading the code, such a compact path forces a break
to figure out
what is going on in these tests.
But I agree with Pekka for the fact that it could be unified in a
single call to trace_seq_printf.
That will produce a small "3 format" easy to understand. Seems good.
next prev parent reply other threads:[~2008-09-30 8:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-29 18:18 [PATCH V2 -tip 1/4] Tracing/ftrace: Change the type of the print_line callback Frederic Weisbecker
2008-09-29 19:14 ` A style question: repeated return value check Pekka Paalanen
2008-09-30 8:33 ` Ingo Molnar
2008-09-30 8:48 ` Frédéric Weisbecker [this message]
2008-09-30 8:50 ` Frédéric Weisbecker
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=c62985530809300148n585327b3w8290b7761063fbd7@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®