diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-06-10 21:56:59 +0200 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-06-15 17:09:31 +0200 |
commit | 0454c7408ac533a0690cb308554a4ed304270c3d (patch) | |
tree | 866c98d36ea6b69e2905729d23d233e1216cb8a4 /drivers/scsi/pcmcia | |
parent | [SCSI] qla2xxx: fix printk format warnings (diff) | |
download | linux-0454c7408ac533a0690cb308554a4ed304270c3d.tar.xz linux-0454c7408ac533a0690cb308554a4ed304270c3d.zip |
[SCSI] nsp_cs: time_out reaches -1
With a postfix decrement timeouts will reach -1 rather than 0, so the
errors do not appear.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/pcmcia')
-rw-r--r-- | drivers/scsi/pcmcia/nsp_cs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c index 11a61ea8d5d9..70b60ade049e 100644 --- a/drivers/scsi/pcmcia/nsp_cs.c +++ b/drivers/scsi/pcmcia/nsp_cs.c @@ -530,7 +530,7 @@ static int nsp_negate_signal(struct scsi_cmnd *SCpnt, unsigned char mask, if (reg == 0xff) { break; } - } while ((time_out-- != 0) && (reg & mask) != 0); + } while ((--time_out != 0) && (reg & mask) != 0); if (time_out == 0) { nsp_msg(KERN_DEBUG, " %s signal off timeut", str); @@ -801,7 +801,7 @@ static void nsp_pio_read(struct scsi_cmnd *SCpnt) data->FifoCount = ocount; - if (time_out == 0) { + if (time_out < 0) { nsp_msg(KERN_DEBUG, "pio read timeout resid=%d this_residual=%d buffers_residual=%d", scsi_get_resid(SCpnt), SCpnt->SCp.this_residual, SCpnt->SCp.buffers_residual); @@ -897,7 +897,7 @@ static void nsp_pio_write(struct scsi_cmnd *SCpnt) data->FifoCount = ocount; - if (time_out == 0) { + if (time_out < 0) { nsp_msg(KERN_DEBUG, "pio write timeout resid=0x%x", scsi_get_resid(SCpnt)); } |