From: scameron@beardog.cce.hp.com
To: Dan Carpenter <error27@gmail.com>
Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>,
iss_storagedev@hp.com, linux-scsi@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] [SCSI] hpsa: precedence bug in hpsa_wait_for_mode_change_ack()
Date: Mon, 7 Feb 2011 11:11:48 -0600 [thread overview]
Message-ID: <20110207171148.GT9565@beardog.cce.hp.com> (raw)
In-Reply-To: <20110207165957.GG4384@bicker>
On Mon, Feb 07, 2011 at 07:59:58PM +0300, Dan Carpenter wrote:
> '!' has higher precedence than '&'. CFGTBL_ChangeReq is 0x1 so the
> original code is equivelent to if (!doorbell_value) {...
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
> index 959eeb2..f46f92a 100644
> --- a/drivers/scsi/hpsa.c
> +++ b/drivers/scsi/hpsa.c
> @@ -3591,7 +3591,7 @@ static void __devinit hpsa_wait_for_mode_change_ack(struct ctlr_info *h)
> spin_lock_irqsave(&h->lock, flags);
> doorbell_value = readl(h->vaddr + SA5_DOORBELL);
> spin_unlock_irqrestore(&h->lock, flags);
> - if (!doorbell_value & CFGTBL_ChangeReq)
> + if (!(doorbell_value & CFGTBL_ChangeReq))
> break;
> /* delay and try again */
> usleep_range(10000, 20000);
Thanks. This looks correct.
-- steve
prev parent reply other threads:[~2011-02-07 17:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-07 16:59 [patch] [SCSI] hpsa: precedence bug in hpsa_wait_for_mode_change_ack() Dan Carpenter
2011-02-07 17:11 ` scameron [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=20110207171148.GT9565@beardog.cce.hp.com \
--to=scameron@beardog.cce.hp.com \
--cc=James.Bottomley@suse.de \
--cc=error27@gmail.com \
--cc=iss_storagedev@hp.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-scsi@vger.kernel.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