summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2015-11-17 19:23:52 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2015-11-25 22:08:35 -0500
commit58c4d046b4d1d5b84875eb73115f3ef092abccce (patch)
treeaefced5d716f820bd7bad7824677b68118ed57b9 /drivers/scsi
parent832e9ac6de16ea07045ab3a18d7a64bc3fb1231c (diff)
downloadlinux-58c4d046b4d1d5b84875eb73115f3ef092abccce.tar.bz2
atp870u: Remove ugly gotos #4
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Hannes Reinicke <hare@suse.de> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/atp870u.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c
index b3d4e9db3c10..68afe1125166 100644
--- a/drivers/scsi/atp870u.c
+++ b/drivers/scsi/atp870u.c
@@ -970,19 +970,19 @@ static void tscam(struct Scsi_Host *host)
} else {
outb(0x00, dev->ioport[0] + 0x1b);
}
-wait_rdyok:
- outb(0x09, dev->ioport[0] + 0x18);
-
- while ((inb(dev->ioport[0] + 0x1f) & 0x80) == 0x00)
- cpu_relax();
- k = inb(dev->ioport[0] + 0x17);
- if (k != 0x16) {
- if ((k == 0x85) || (k == 0x42)) {
- continue;
- }
- outb(0x41, dev->ioport[0] + 0x10);
- goto wait_rdyok;
- }
+ do {
+ outb(0x09, dev->ioport[0] + 0x18);
+
+ while ((inb(dev->ioport[0] + 0x1f) & 0x80) == 0x00)
+ cpu_relax();
+ k = inb(dev->ioport[0] + 0x17);
+ if ((k == 0x85) || (k == 0x42))
+ break;
+ if (k != 0x16)
+ outb(0x41, dev->ioport[0] + 0x10);
+ } while (k != 0x16);
+ if ((k == 0x85) || (k == 0x42))
+ continue;
assignid_map |= m;
}
@@ -1003,10 +1003,8 @@ wait_rdyok:
mdelay(128);
val &= 0x00fb; /* after 1ms no msg */
outw(val, dev->ioport[0] + 0x1c);
-wait_nomsg:
- if ((inb(dev->ioport[0] + 0x1c) & 0x04) != 0) {
- goto wait_nomsg;
- }
+ while ((inb(dev->ioport[0] + 0x1c) & 0x04) != 0)
+ ;
outb(1, 0x80);
udelay(100);
for (n = 0; n < 0x30000; n++) {