From: Roel Kluin <12o3l@tiscali.nl> Date: Mon, 28 Jan 2008 13:09:54 +0000 (+0100) Subject: [SCSI] aic7xxx: Test opcode, not definition in aicasm:type_check() X-Git-Tag: v2.6.26-rc1~1140^2~95 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=0b6c4b14cfb2fd89064d29bdead62f9ed8631399;p=linux-2.6-omap-h63xx.git [SCSI] aic7xxx: Test opcode, not definition in aicasm:type_check() 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 Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y index 6066998ed56..702e2dbd11f 100644 --- a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y +++ b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y @@ -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; /*