From patchwork Tue Jun 7 17:38:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 631820 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rPQ8t02JLz9t3k for ; Wed, 8 Jun 2016 07:45:18 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b=SSSk4Z/S; dkim-atps=neutral Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3rPQ8s65d0zDrLB for ; Wed, 8 Jun 2016 07:45:17 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b=SSSk4Z/S; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rPJjl0G6GzDq64 for ; Wed, 8 Jun 2016 03:39:55 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b=SSSk4Z/S; dkim-atps=neutral Received: by mail-wm0-f47.google.com with SMTP id k204so79273003wmk.0 for ; Tue, 07 Jun 2016 10:39:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AU9F81gbXozmOFXln+C4lpHX1JCN1bn+4IKf9lXrhZw=; b=SSSk4Z/SXSdtsICqWgnI8DzxLbn/uXh8v/XSqhlHbw4DGi4PsA1c48LJhtSvi/Bw1h Rpwk3SpO0jFlwA5o/TsT0oB6PpyFH/wFP1MC3R9qxgWUoQniq1UaLx8TApR0/QuKbhxk nY0hp7Y53Q2I21XZpytKy2zKmef9u/64oauEk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AU9F81gbXozmOFXln+C4lpHX1JCN1bn+4IKf9lXrhZw=; b=MyvdLvFfUjX7at9if1W4UxxyCYJAP8QShP+/Su3wApbu6gC5F/8t7RL9bw5yT/J2CD quEEllBrUgMzKZh1zSCoyFK1DpONLWoPuCGEfO7sfMy3KFlPmS4BTvSCobrCAUsM8k/g 9a2XHPERekntF29fjsmmteD4AsA/pAdtvOhoTutB5KiThYkriuJSB6EQkA9UUvK7uACa Af2NDeDN80V46eBDmszUMJ8ElL2CZWykOQ4aQzQS9uzMleKVAH5f6gji2wPPMpvsrNrv d72mPGhvvAB3IUFI9BuMvLzqn/YwrvnOyo5bWNjPw4U2Ru37skGss2CgnLbqq1WzmCyn JaMQ== X-Gm-Message-State: ALyK8tJFewvvZqrjDEv1H2wuu493tw6QFRSkt2movbMlRuGfWcJDO+xd9RZqOahV7oFQGO2j X-Received: by 10.28.144.7 with SMTP id s7mr3928299wmd.103.1465321132507; Tue, 07 Jun 2016 10:38:52 -0700 (PDT) Received: from localhost.localdomain (cpc84731-aztw28-2-0-cust112.18-1.cable.virginm.net. [82.37.67.113]) by smtp.gmail.com with ESMTPSA id h8sm1310031wjg.9.2016.06.07.10.38.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Jun 2016 10:38:51 -0700 (PDT) From: Peter Griffin To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@stlinux.com, vinod.koul@intel.com, linus.walleij@linaro.org, dan.j.williams@intel.com, leoli@freescale.com, zw@zh-kernel.org, baohua@kernel.org, maxime.ripard@free-electrons.com, wens@csie.org, ldewangan@nvidia.com, jonathanh@nvidia.com, swarren@wwwdotorg.org, thierry.reding@gmail.com, gnurou@gmail.com Subject: [PATCH 4/8] dmaengine: s3c24xx: Simplify code in s3c24xx_dma_tx_status() Date: Tue, 7 Jun 2016 18:38:37 +0100 Message-Id: <1465321121-22238-5-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465321121-22238-1-git-send-email-peter.griffin@linaro.org> References: <1465321121-22238-1-git-send-email-peter.griffin@linaro.org> X-Mailman-Approved-At: Wed, 08 Jun 2016 07:37:26 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.griffin@linaro.org, dmaengine@vger.kernel.org, linux-tegra@vger.kernel.org, lee.jones@linaro.org, linuxppc-dev@lists.ozlabs.org MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Doing so saves a few lines of code in the driver. Signed-off-by: Peter Griffin --- drivers/dma/s3c24xx-dma.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/dma/s3c24xx-dma.c b/drivers/dma/s3c24xx-dma.c index 17ccdfd..f7d2c7a 100644 --- a/drivers/dma/s3c24xx-dma.c +++ b/drivers/dma/s3c24xx-dma.c @@ -768,16 +768,12 @@ static enum dma_status s3c24xx_dma_tx_status(struct dma_chan *chan, spin_lock_irqsave(&s3cchan->vc.lock, flags); ret = dma_cookie_status(chan, cookie, txstate); - if (ret == DMA_COMPLETE) { - spin_unlock_irqrestore(&s3cchan->vc.lock, flags); - return ret; - } /* * There's no point calculating the residue if there's * no txstate to store the value. */ - if (!txstate) { + if (ret == DMA_COMPLETE || !txstate) { spin_unlock_irqrestore(&s3cchan->vc.lock, flags); return ret; }