summaryrefslogtreecommitdiff
path: root/drivers/scsi/atp870u.c
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2015-11-17 19:23:51 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2015-11-25 22:08:34 -0500
commit832e9ac6de16ea07045ab3a18d7a64bc3fb1231c (patch)
treefc97ce6757de3e9c16dd16f127ddccda22370a0c /drivers/scsi/atp870u.c
parent468b8968157466996b70c610c080c41ae517c61c (diff)
atp870u: Remove ugly gotos #3
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/atp870u.c')
-rw-r--r--drivers/scsi/atp870u.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c
index 999bf74c3a86..b3d4e9db3c10 100644
--- a/drivers/scsi/atp870u.c
+++ b/drivers/scsi/atp870u.c
@@ -880,34 +880,28 @@ static unsigned char fun_scam(struct atp_unit *dev, unsigned short int *val)
unsigned char j;
outw(*val, dev->ioport[0] + 0x1c);
-FUN_D7:
for (i = 0; i < 10; i++) { /* stable >= bus settle delay(400 ns) */
k = inw(dev->ioport[0] + 0x1c);
j = (unsigned char) (k >> 8);
- if ((k & 0x8000) != 0) { /* DB7 all release? */
- goto FUN_D7;
- }
+ if ((k & 0x8000) != 0) /* DB7 all release? */
+ i = 0;
}
*val |= 0x4000; /* assert DB6 */
outw(*val, dev->ioport[0] + 0x1c);
*val &= 0xdfff; /* assert DB5 */
outw(*val, dev->ioport[0] + 0x1c);
-FUN_D5:
for (i = 0; i < 10; i++) { /* stable >= bus settle delay(400 ns) */
- if ((inw(dev->ioport[0] + 0x1c) & 0x2000) != 0) { /* DB5 all release? */
- goto FUN_D5;
- }
+ if ((inw(dev->ioport[0] + 0x1c) & 0x2000) != 0) /* DB5 all release? */
+ i = 0;
}
*val |= 0x8000; /* no DB4-0, assert DB7 */
*val &= 0xe0ff;
outw(*val, dev->ioport[0] + 0x1c);
*val &= 0xbfff; /* release DB6 */
outw(*val, dev->ioport[0] + 0x1c);
-FUN_D6:
for (i = 0; i < 10; i++) { /* stable >= bus settle delay(400 ns) */
- if ((inw(dev->ioport[0] + 0x1c) & 0x4000) != 0) { /* DB6 all release? */
- goto FUN_D6;
- }
+ if ((inw(dev->ioport[0] + 0x1c) & 0x4000) != 0) /* DB6 all release? */
+ i = 0;
}
return j;