[PATCH 36/36] aha1542: remove loop from aha1542_outb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The loop in aha1542_outb with double-check is no longer needed, remove it.

Signed-off-by: Ondrej Zary <linux@xxxxxxxxxxxxxxxxxxxx>
---
 drivers/scsi/aha1542.c |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index af821f3..ec43276 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -91,14 +91,11 @@ static inline bool wait_mask(u16 port, u8 mask, u8 allof, u8 noneof, int timeout
 
 static int aha1542_outb(unsigned int base, u8 val)
 {
-	while (1) {
-		if (!wait_mask(STATUS(base), CDF, 0, CDF, 0))
-			return 1;
-		if (inb(STATUS(base)) & CDF)
-			continue;
-		outb(val, DATA(base));
-		return 0;
-	}
+	if (!wait_mask(STATUS(base), CDF, 0, CDF, 0))
+		return 1;
+	outb(val, DATA(base));
+
+	return 0;
 }
 
 static int aha1542_out(unsigned int base, u8 *buf, int len)
-- 
Ondrej Zary

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux