From d8187b945aa4ed9ea298518e3dac691ea09724e5 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Tue, 10 Aug 2010 18:01:17 -0700 Subject: [PATCH] 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 Cc: Oliver Neukum Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/scsi/dc395x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, 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++; } -- 2.39.5