From: Dan Carpenter Date: Tue, 15 Feb 2011 21:33:13 +0000 (-0600) Subject: [SCSI] hpsa: fix bad comparison X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=382be668c5a284844f9dcbb5b1cb8ffba2386d80;p=linux-beck.git [SCSI] hpsa: fix bad comparison '!' has higher precedence than '&'. CFGTBL_ChangeReq is 0x1 so the original code is equivelent to if (!doorbell_value) {... Signed-off-by: Dan Carpenter Acked-by: Stephen M. Cameron Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index eb6938fe77b0..c30591f84a06 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -3614,7 +3614,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);