From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-kernel@vger.kernel.org, torvalds@osdl.org
Subject: Re: PATCH: Fix broken PIO with libata
Date: Wed, 17 May 2006 00:57:22 +0900 [thread overview]
Message-ID: <4469F662.6000407@gmail.com> (raw)
In-Reply-To: <4469F43C.3080406@pobox.com>
Jeff Garzik wrote:
> Tejun Heo wrote:
>> Is this agreed upon? I tend to omit almost all unnecessary (by operator
>> precedence) parenthesis, so in new EH and all other stuff, the "a && b &
>> c" sort of lines are abundant. If this is something that's agreed upon,
>> I can do a clean sweep over those.
>
>
> More parens == easier to review. So
> a && b & c
> should be
> a && (b & c)
Understood. Usually, my rule is something like doing the least
maximizes consistency (style-wise) thus increasing readability in the
end, but rules usually suck, don't they? What fits the most eyes is the
best, I guess.
> to clearly delineate the separate expressions to the human eye, and also
> make it clear to the reader that the '&' is intended, and not a typo
> that should have been '&&'.
>
> Anytime you see a long string of 'if' conditions, and the operators
> vary, add parents for readability.
>
Yeap, will do, from now on.
--
tejun
next prev parent reply other threads:[~2006-05-16 15:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-16 14:39 Alan Cox
2006-05-16 15:33 ` Kevin Radloff
2006-05-16 15:53 ` Alan Cox
2006-05-16 17:19 ` Kevin Radloff
2006-05-16 17:27 ` Jeff Garzik
2006-05-16 17:39 ` Tejun Heo
2006-05-16 18:13 ` Kevin Radloff
2006-05-16 22:51 ` Alan Cox
2006-05-16 15:36 ` Tejun Heo
2006-05-16 15:48 ` Jeff Garzik
2006-05-16 15:57 ` Tejun Heo [this message]
2006-05-16 23:00 ` Paul Mackerras
2006-05-16 17:10 ` Jeff Garzik
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=4469F662.6000407@gmail.com \
--to=htejun@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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®