Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp893173ybe; Thu, 19 Sep 2019 05:37:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqx5uNQhYHIub9o68C0OmwL41tY1ofgkj0SIifcBty/C2WMkpD0ddcHeFapmJEgCuiOUe/QA X-Received: by 2002:a17:906:f51:: with SMTP id h17mr13919010ejj.197.1568896641911; Thu, 19 Sep 2019 05:37:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568896641; cv=none; d=google.com; s=arc-20160816; b=VQju9IQ4FSj944/Lr6gZlw16Q3UWOAXHM8Eajq2LsPo4sgDg9EblEHtqj7uEZXsxks KMtxWNs5biALIEP6u56naBAfot8emBKGWq1/FVybEy14tZGPY7YWs4xN/WaDV/yZWGrf SE3EEp8e/6FmkDTL1ppU5rNcCFMbHZcHxKNJyLlPvMQ13TiRYkBrP2C/RF2zqZF73+0n 9ABdtFeJ2NWJR4Ttlisj2e8/mBnThppMWKnQ3fUTpQINJN8R1mWz00s9Gm1b/eMKGsAU hn+UavFubzIfOx8P/r9picnnuiXU0F4sybs53qHvd1pgCrKyYZyv0AlXg6Cc4QawbIGq DrCw== 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=6cPy+dgfPN88CaXcjCJBeD0hiBo/z2SxQFT1ufTIZSU=; b=RFkeb5QG8IbS9isGeEKAvFg1CPSb80H20WB8g0Lld6kwWA7iA7aZxfdAWWyxnXA3HX 3Q4jPtXSWhnqlLtt2MeqEQQ7OXr6C616PMLkAwxctFxlpqJ14NK7GoSbtpoumgY/bt9X l73G+T9wKURGnqZYeHYChFifSp33qtU2WsEfMxv52ROpy/BOfBvlg3wkh+OeGG19KkGA 3MaTFigax4lvuA/2IVH4cUYSRtmuJWaf+quMGtWb7rmrKySE+/Rfl/MNA4USlnR8WDnD h6D5HQhLezrH06SamRZy5K37W/riP9xkreMMlYBmFUgehm1y/ARQlwUfRStWIG/vtA7D Qe1A== 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 by16si4828943edb.30.2019.09.19.05.36.58; Thu, 19 Sep 2019 05:37:21 -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 S2389360AbfISKph (ORCPT + 99 others); Thu, 19 Sep 2019 06:45:37 -0400 Received: from mx1.emlix.com ([188.40.240.192]:57744 "EHLO mx1.emlix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387520AbfISKpc (ORCPT ); Thu, 19 Sep 2019 06:45:32 -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 BA3C3603E7; Thu, 19 Sep 2019 12:45:31 +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 v3 3/3] dmaengine: imx-sdma: drop redundant variable Date: Thu, 19 Sep 2019 12:45:26 +0200 Message-Id: <20190919104526.29851-4-philipp.puschmann@emlix.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190919104526.29851-1-philipp.puschmann@emlix.com> References: <20190919102319.23368-1-philipp.puschmann@emlix.com> <20190919104526.29851-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 v3: - no changes 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