Skip to content

Commit

Permalink
dc395x: decrease iteration for tag_number of max_command in start_scsi()
Browse files Browse the repository at this point in the history
The tag_number reaches dcb->max_command + 1 after the loop, but when
the tag_number equals dcb->max_command an error message is already
issued. The last iteration therefore appears obsolete.

Signed-off-by: Roel Kluin <[email protected]>
Cc: Oliver Neukum <[email protected]>
Cc: James Bottomley <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
RoelKluin authored and torvalds committed Aug 11, 2010
1 parent 702a98c commit d8187b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/dc395x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1597,7 +1597,7 @@ static u8 start_scsi(struct AdapterCtlBlk* acb, struct DeviceCtlBlk* dcb,
u32 tag_mask = 1;
u8 tag_number = 0;
while (tag_mask & dcb->tag_mask
&& tag_number <= dcb->max_command) {
&& tag_number < dcb->max_command) {
tag_mask = tag_mask << 1;
tag_number++;
}
Expand Down

0 comments on commit d8187b9

Please sign in to comment.