1
0
Fork 0

dc395x: decrease iteration for tag_number of max_command in start_scsi()

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 <roel.kluin@gmail.com>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
hifive-unleashed-5.1
Roel Kluin 2010-08-10 18:01:17 -07:00 committed by Linus Torvalds
parent 702a98c633
commit d8187b945a
1 changed files with 1 additions and 1 deletions

View File

@ -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++;
}