From: Adrian Bunk <bunk@stusta.de>
To: Andrew Morton <akpm@osdl.org>
Cc: lw_linux@hotmail.com, 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: Mon, 2 May 2005 03:47:10 +0200 [thread overview]
Message-ID: <20050502014710.GA3592@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>
---
This patch was already sent on:
- 10 Apr 2005
--- 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-05-02 2:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-02 1:47 Adrian Bunk [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-04-09 23:10 [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=20050502014710.GA3592@stusta.de \
--to=bunk@stusta.de \
--cc=James.Bottomley@SteelEye.com \
--cc=akpm@osdl.org \
--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