From owner-svn-src-head@FreeBSD.ORG Sat Apr 12 23:40:54 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D30A548F; Sat, 12 Apr 2014 23:40:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C00C91AFD; Sat, 12 Apr 2014 23:40:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3CNesvs009723; Sat, 12 Apr 2014 23:40:54 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3CNesfR009722; Sat, 12 Apr 2014 23:40:54 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201404122340.s3CNesfR009722@svn.freebsd.org> From: Rui Paulo Date: Sat, 12 Apr 2014 23:40:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r264389 - head/sys/dev/ata X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 23:40:54 -0000 Author: rpaulo Date: Sat Apr 12 23:40:54 2014 New Revision: 264389 URL: http://svnweb.freebsd.org/changeset/base/264389 Log: Fix the style of ata_interrupt_locked(). Modified: head/sys/dev/ata/ata-all.c Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Sat Apr 12 23:29:29 2014 (r264388) +++ head/sys/dev/ata/ata-all.c Sat Apr 12 23:40:54 2014 (r264389) @@ -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