Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1037924ybe; Thu, 19 Sep 2019 07:44:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqzQ/qLkC0qy+aM8Scb2EGnhNYEnXiAxX7ZKkQwAA7mVo5t5Tky7V2EZ19sD3F/C6ogg6s/i X-Received: by 2002:a17:906:1998:: with SMTP id g24mr4467158ejd.305.1568904282294; Thu, 19 Sep 2019 07:44:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568904282; cv=none; d=google.com; s=arc-20160816; b=eOwmFyJhsoien92t048t0prCDnBMmlBAPNQ8En1Zxsp7Xmd92kxKcpp2EGZo14THcX /coyYHFDkq8ec8yk//mnSIS+NKsFLAId9sqzvlubaoSms7cv8VF4qHFehoHwCG8SDr8b IUygQAyzyUVNfXS4pXApPjrHXFWVRf4sejMIVvGD058zYua9ZW226mYdbbmQ6A6ZArpF IpWSBdZEbYWvEY4A/73UQ6RLqqyvDsYk6W4UCLJR3BaLAmTBkptJWgRl/IArz12npkNk 6MGNHImfh9EY+LzEX/5Gp0pDhkpeRm61AJyad/yWCY3hHjE3aiTAPJqLZbP79KR3Tguo k85w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=aOr9omyeNbi6nEH2N5EzsP0RtwrONPGb2MqVj0PADCA=; b=oKx+2PZMzWc8jaop9v5Xwheg93QSGMNYwTI6WpV4ngd484RnKYMTUP1bCusO7g/HNH F4PrI8GAVSn1P/UcZ8u9qFWINY4bwaqzZDK1jgG4L/ZWkmI6vxSLQDMd2xDujBRj+s1Y zsUWj/B2L4tPcvaVhKFQ8Feaw+wFsVYPYBSF4P8k4Zx0RrpDTeWb032YMnI8JtiC72ZR AipStqMiddJ7maj9LbxegUawbEGmrPEPxopvZu/XhIsWMidsUGwVoDeEmIbHvqHSLhc2 +M5BbHOgCzkVlu8wqM7Wy2fXY5KhFn9QjFpXnZu44bPb2mn0j7kxC0YEWVEYkQFR4P9l v03Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j51si5496128ede.301.2019.09.19.07.44.18; Thu, 19 Sep 2019 07:44:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389183AbfISKXt (ORCPT + 99 others); Thu, 19 Sep 2019 06:23:49 -0400 Received: from mx1.emlix.com ([188.40.240.192]:57592 "EHLO mx1.emlix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389171AbfISKXs (ORCPT ); Thu, 19 Sep 2019 06:23:48 -0400 Received: from mailer.emlix.com (unknown [81.20.119.6]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.emlix.com (Postfix) with ESMTPS id B5CBD603D9; Thu, 19 Sep 2019 12:23:46 +0200 (CEST) From: Philipp Puschmann To: linux-kernel@vger.kernel.org Cc: yibin.gong@nxp.com, fugang.duan@nxp.com, l.stach@pengutronix.de, dan.j.williams@intel.com, vkoul@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, dmaengine@vger.kernel.or, linux-arm-kernel@lists.infradead.org, Philipp Puschmann Subject: [PATCH v2 3/3] dmaengine: imx-sdma: drop redundant variable Date: Thu, 19 Sep 2019 12:23:19 +0200 Message-Id: <20190919102319.23368-4-philipp.puschmann@emlix.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190919102319.23368-1-philipp.puschmann@emlix.com> References: <20190911144943.21554-1-philipp.puschmann@emlix.com> <20190919102319.23368-1-philipp.puschmann@emlix.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In sdma_prep_dma_cyclic buf is redundant. Drop it. Signed-off-by: Philipp Puschmann Reviewed-by: Lucas Stach --- Changelog v2: - add Reviewed-by tag drivers/dma/imx-sdma.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index a32b5962630e..17961451941a 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1544,7 +1544,7 @@ static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic( struct sdma_engine *sdma = sdmac->sdma; int num_periods = buf_len / period_len; int channel = sdmac->channel; - int i = 0, buf = 0; + int i; struct sdma_desc *desc; dev_dbg(sdma->dev, "%s channel: %d\n", __func__, channel); @@ -1565,7 +1565,7 @@ static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic( goto err_bd_out; } - while (buf < buf_len) { + for (i = 0; i < num_periods; i++) { struct sdma_buffer_descriptor *bd = &desc->bd[i]; int param; @@ -1592,9 +1592,6 @@ static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic( bd->mode.status = param; dma_addr += period_len; - buf += period_len; - - i++; } return vchan_tx_prep(&sdmac->vc, &desc->vd, flags); -- 2.23.0