aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2010-08-10 21:01:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-11 11:59:00 -0400
commitd8187b945aa4ed9ea298518e3dac691ea09724e5 (patch)
tree003fb86fa4b9e5b4419482263709689a63e11377 /drivers
parent702a98c63355b74aec50897870eb1c89b5009cfb (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/dc395x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
index bd977be7544e..54f50b07dac7 100644
--- a/drivers/scsi/dc395x.c
+++ b/drivers/scsi/dc395x.c
@@ -1597,7 +1597,7 @@ static u8 start_scsi(struct AdapterCtlBlk* acb, struct DeviceCtlBlk* dcb,
1597 u32 tag_mask = 1; 1597 u32 tag_mask = 1;
1598 u8 tag_number = 0; 1598 u8 tag_number = 0;
1599 while (tag_mask & dcb->tag_mask 1599 while (tag_mask & dcb->tag_mask
1600 && tag_number <= dcb->max_command) { 1600 && tag_number < dcb->max_command) {
1601 tag_mask = tag_mask << 1; 1601 tag_mask = tag_mask << 1;
1602 tag_number++; 1602 tag_number++;
1603 } 1603 }