From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Norbert Kiesel <nkiesel@tbdnetworks.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Multiple & vs. && and | vs. || bugs in 2.4 and 2.5
Date: 02 Mar 2003 11:54:38 +0100 [thread overview]
Message-ID: <1046602478.2030.105.camel@zion.wanadoo.fr> (raw)
In-Reply-To: <20030302102751.GA26028@defiant>
On Sun, 2003-03-02 at 11:27, Norbert Kiesel wrote:
> linux-2.4.20/drivers/video/aty128fb.c:2534: if (!reg & LVDS_ON) {
> linux-2.4.20/drivers/video/radeonfb.c:2781: if (!lvds_gen_cntl & LVDS_ON) {
There two are single bit tests, they should probably be written
with an additional parenthesis:
if (!(reg & LVDS_ON))
if (!(lvds_gen_cntl & LVDS_ON))
Though in these specific cases, I tend to prefer writing it this way
if ((reg & LVDS_ON) == 0)
if ((lvds_gen_cntrl & LVDS_ON) == 0)
Since I'm the author of both of the above (though I'm not the driver
maintainer), feel free to send the typo fixes to Marcelo along with
Ani Joshi (driver maintainer)
Ben.
prev parent reply other threads:[~2003-03-02 10:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-02 10:27 Norbert Kiesel
2003-03-02 10:31 ` William Lee Irwin III
2003-03-02 10:43 ` Muli Ben-Yehuda
2003-03-02 10:54 ` Benjamin Herrenschmidt [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=1046602478.2030.105.camel@zion.wanadoo.fr \
--to=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nkiesel@tbdnetworks.com \
/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®