* [patch] [SCSI] hpsa: precedence bug in
@ 2011-02-07 16:59 Dan Carpenter
2011-02-07 17:11 ` [patch] [SCSI] hpsa: precedence bug in hpsa_wait_for_mode_change_ack() scameron
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-02-07 16:59 UTC (permalink / raw)
To: Stephen M. Cameron
Cc: James E.J. Bottomley, iss_storagedev, linux-scsi, kernel-janitors
'!' 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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] [SCSI] hpsa: precedence bug in hpsa_wait_for_mode_change_ack()
2011-02-07 16:59 [patch] [SCSI] hpsa: precedence bug in Dan Carpenter
@ 2011-02-07 17:11 ` scameron
0 siblings, 0 replies; 2+ messages in thread
From: scameron @ 2011-02-07 17:11 UTC (permalink / raw)
To: Dan Carpenter
Cc: James E.J. Bottomley, iss_storagedev, linux-scsi, kernel-janitors
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-07 17:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-07 16:59 [patch] [SCSI] hpsa: precedence bug in Dan Carpenter
2011-02-07 17:11 ` [patch] [SCSI] hpsa: precedence bug in hpsa_wait_for_mode_change_ack() scameron
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).