public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] [SCSI] hpsa: precedence bug in hpsa_wait_for_mode_change_ack()
@ 2011-02-07 16:59 Dan Carpenter
  2011-02-07 17:11 ` 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

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 hpsa_wait_for_mode_change_ack() Dan Carpenter
2011-02-07 17:11 ` scameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox