Skip to content

Commit

Permalink
[SCSI] aic7xxx: Test opcode, not definition in aicasm:type_check()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roel Kluin authored and James Bottomley committed Apr 7, 2008
1 parent 639db47 commit 0b6c4b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down

0 comments on commit 0b6c4b1

Please sign in to comment.