From: Adrian Bunk <bunk@stusta.de>
To: lw_linux@hotmail.com
Cc: James.Bottomley@SteelEye.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [2.6 patch] drivers/scsi/sym53c416.c: fix a wrong check
Date: Sun, 10 Apr 2005 01:10:57 +0200 [thread overview]
Message-ID: <20050409231057.GS3632@stusta.de> (raw)
The Coverity checker found that this for loop was wrong.
This patch changes it to what seems to be intended.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.12-rc2-mm2-full/drivers/scsi/sym53c416.c.old 2005-04-09 22:16:04.000000000 +0200
+++ linux-2.6.12-rc2-mm2-full/drivers/scsi/sym53c416.c 2005-04-09 22:16:28.000000000 +0200
@@ -803,19 +803,19 @@
static int sym53c416_host_reset(Scsi_Cmnd *SCpnt)
{
int base;
int scsi_id = -1;
int i;
/* printk("sym53c416_reset\n"); */
base = SCpnt->device->host->io_port;
/* search scsi_id - fixme, we shouldnt need to iterate for this! */
- for(i = 0; i < host_index && scsi_id != -1; i++)
+ for(i = 0; i < host_index && scsi_id == -1; i++)
if(hosts[i].base == base)
scsi_id = hosts[i].scsi_id;
outb(RESET_CHIP, base + COMMAND_REG);
outb(NOOP | PIO_MODE, base + COMMAND_REG);
outb(RESET_SCSI_BUS, base + COMMAND_REG);
sym53c416_init(base, scsi_id);
return SUCCESS;
}
next reply other threads:[~2005-04-09 23:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-09 23:10 Adrian Bunk [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-05-02 1:47 [2.6 patch] drivers/scsi/sym53c416.c: fix a wrong check Adrian Bunk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050409231057.GS3632@stusta.de \
--to=bunk@stusta.de \
--cc=James.Bottomley@SteelEye.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=lw_linux@hotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox