From: Matthew Wilcox <matthew@wil.cx>
To: vignesh babu <vignesh.babu@wipro.com>
Cc: linux-scsi@vger.kernel.org,
Kernel Janitors List <kernel-janitors@lists.osdl.org>
Subject: Re: [PATCH]is_power_of_2-scsi/NCR53C9x.c
Date: Tue, 12 Jun 2007 05:50:00 -0600 [thread overview]
Message-ID: <20070612114959.GD11591@parisc-linux.org> (raw)
In-Reply-To: <1181625877.11780.24.camel@merlin.linuxcoe.com>
On Tue, Jun 12, 2007 at 10:54:36AM +0530, vignesh babu wrote:
> @@ -1651,7 +1652,7 @@ static inline int reconnect_target(struct NCR_ESP *esp, struct ESP_regs *eregs)
> if(!(it & me))
> return -1;
> it &= ~me;
> - if(it & (it - 1))
> + if(!is_power_of_2(it))
> return -1;
> while(!(it & 1))
> targ++, it >>= 1;
I think you actually want to do:
- if(!(it & me))
- return -1;
it &= ~me;
- if(it & (it - 1))
+ if (!is_power_of_2(it))
return -1;
as it looks to me like the first test is checking for the n != 0 case in
is_power_of_two().
Not that it'll matter much -- AIUI, this driver is scheduled for
deletion soon.
prev parent reply other threads:[~2007-06-12 11:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-12 5:24 [PATCH]is_power_of_2-scsi/NCR53C9x.c vignesh babu
2007-06-12 11:50 ` Matthew Wilcox [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=20070612114959.GD11591@parisc-linux.org \
--to=matthew@wil.cx \
--cc=kernel-janitors@lists.osdl.org \
--cc=linux-scsi@vger.kernel.org \
--cc=vignesh.babu@wipro.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;
as well as URLs for NNTP newsgroup(s).