Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 May 2014 22:01:17 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r266366 - stable/10/sys/dev/ata
Message-ID:  <201405172201.s4HM1Ha3034273@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Sat May 17 22:01:17 2014
New Revision: 266366
URL: http://svnweb.freebsd.org/changeset/base/266366

Log:
  MFC 264389: Fix the style of ata_interrupt_locked().

Modified:
  stable/10/sys/dev/ata/ata-all.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/ata/ata-all.c
==============================================================================
--- stable/10/sys/dev/ata/ata-all.c	Sat May 17 22:00:10 2014	(r266365)
+++ stable/10/sys/dev/ata/ata-all.c	Sat May 17 22:01:17 2014	(r266366)
@@ -360,24 +360,23 @@ ata_interrupt(void *data)
 static void
 ata_interrupt_locked(void *data)
 {
-    struct ata_channel *ch = (struct ata_channel *)data;
-    struct ata_request *request;
+	struct ata_channel *ch = (struct ata_channel *)data;
+	struct ata_request *request;
 
-    do {
 	/* ignore interrupt if its not for us */
 	if (ch->hw.status && !ch->hw.status(ch->dev))
-	    break;
+		return;
 
 	/* do we have a running request */
 	if (!(request = ch->running))
-	    break;
+		return;
 
 	ATA_DEBUG_RQ(request, "interrupt");
 
 	/* safetycheck for the right state */
 	if (ch->state == ATA_IDLE) {
-	    device_printf(request->dev, "interrupt on idle channel ignored\n");
-	    break;
+		device_printf(request->dev, "interrupt on idle channel ignored\n");
+		return;
 	}
 
 	/*
@@ -385,13 +384,12 @@ ata_interrupt_locked(void *data)
 	 * if it finishes immediately otherwise wait for next interrupt
 	 */
 	if (ch->hw.end_transaction(request) == ATA_OP_FINISHED) {
-	    ch->running = NULL;
-	    if (ch->state == ATA_ACTIVE)
-		ch->state = ATA_IDLE;
-	    ata_cam_end_transaction(ch->dev, request);
-	    return;
+		ch->running = NULL;
+		if (ch->state == ATA_ACTIVE)
+			ch->state = ATA_IDLE;
+		ata_cam_end_transaction(ch->dev, request);
+		return;
 	}
-    } while (0);
 }
 
 static void



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405172201.s4HM1Ha3034273>