]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] aic7xxx: Test opcode, not definition in aicasm:type_check()
authorRoel Kluin <12o3l@tiscali.nl>
Mon, 28 Jan 2008 13:09:54 +0000 (14:09 +0100)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 7 Apr 2008 17:18:59 +0000 (12:18 -0500)
This fixes a bug that we treat all sequencer operations as ands and
never do the additional invalid bit checks non-and operations require
because the if () to determine this has an operand which is always
true at the end of the or statement.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/aic7xxx/aicasm/aicasm_gram.y

index 6066998ed5624388ccb2f5802094a0cb848a9c5f..702e2dbd11fb5b2feecfc701b52520fa76aade15 100644 (file)
@@ -1837,7 +1837,7 @@ type_check(symbol_t *symbol, expression_t *expression, int opcode)
        int and_op;
 
        and_op = FALSE;
-       if (opcode == AIC_OP_AND || opcode == AIC_OP_JNZ || AIC_OP_JZ)
+       if (opcode == AIC_OP_AND || opcode == AIC_OP_JNZ || opcode == AIC_OP_JZ)
                and_op = TRUE;
 
        /*