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: 69572 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp2096964qgf; Tue, 7 Jun 2016 10:40:52 -0700 (PDT) X-Received: by 10.98.108.3 with SMTP id h3mr573540pfc.15.1465321252253; Tue, 07 Jun 2016 10:40:52 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id f62si10280099pfa.18.2016.06.07.10.40.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jun 2016 10:40:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bAKyl-0007mO-8V; Tue, 07 Jun 2016 17:39:51 +0000 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1bAKyA-0007CD-6p for linux-arm-kernel@lists.infradead.org; Tue, 07 Jun 2016 17:39:15 +0000 Received: by mail-wm0-x22e.google.com with SMTP id v199so30004405wmv.0 for ; Tue, 07 Jun 2016 10:38:53 -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=eE2N+sahNYv9rDaCSpa9X2d37Pb5O3nJFG8m+wODKFSzNfSAx+TKvc+FMkc+JxEjmW 8H79zuHiS17gcukBXMNr3SIiamW0XnrYqzdBhG7Ytwt6823Fw/TuUBGb0RLlPSPwtm3E 2SLTH1PdXJY6rbiH1GHR9Ls5AV0AIcsznkc/PXeCdXelJAFOFEuWcBkI7yLxyW17cycB R1gPc9bhlYUX/AxglmwoF8MDJ8iriIe77SAVJSCbaXh71SVgQ1kp7fsd8wad7z9uHLod 6IWBfQgRQluDdOy7dcotV2WpVco1QW3MbaPa5za++lV3ekGoqkj5wdNpAsAOKtb79VfG Nbvw== X-Gm-Message-State: ALyK8tIF0+6ohxSIoOLbUhrN3JhhZMtz2QzL11gGO8y2nbbnwSbY54dDPDGA/vzt3tax4R7v 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160607_103914_582227_FD8B953E X-CRM114-Status: GOOD ( 12.70 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:22e listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: 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 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org 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(-) -- 1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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; }