Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1004984ybe; Wed, 11 Sep 2019 08:01:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqxUWMcCM9clEwg3c+1qo/MtraDbnJV+7jB+BpDhc5LsgMsHqd+Kk4/7O/hRTxS+y+VD9Z3m X-Received: by 2002:a17:906:ece8:: with SMTP id qt8mr29992978ejb.5.1568214060989; Wed, 11 Sep 2019 08:01:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568214060; cv=none; d=google.com; s=arc-20160816; b=wDzjdMc1TXSvGcQvYVM7eDcIrxVH93kEnQYRULyp3sWcnwL2VWtKb+0KavzLwm43NA A1d3Jc+Nef7S93Kj1wle5NeRQgclaqfvGL1sVtwzWmfLxkoSbeZKwNzJBLsJpIVxDTh4 EH4K0d5rMO1IL/kyx9n9xHCxZOlZWuTY6TP5iLQ3sAW/WMOUKE4zMOJJtZKfnxE8PyNA +vBlXU8u6Pmlhs3XzuUa41v/OOyw042nzzbUbo5qQ96Mm1hId8/loOfSVihe1GrhFs0i W7cCsJoY0Ng+4dEmjr7uWqPO3yAYtlARjDoNrPrKugy4Slv2zzloIip0nkuKJiAxQYhH pU6w== 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=0R0jpzOj8rgAMlc3K4GnUdW5S5Qdmt5Qh5K8qzMc9LM=; b=pwDGhyAcWdVfjF9ySuy+OU6inpUtRlHn9B1C0NOjXoDKNqh5+ZBudZCM78iR+WiSXp 9g1AVFmrU6OyxrmFJ5yPfpRbD0LVS+x3n9H7Fw0Cr8PvEUEwEADsiGfl+7PJQKOTQzVJ t6KuBoQ59OsdDUp4cHNbJol0AFtroxocjAPSy4+Cf2Tbqs5fUuiQyQWykK/yUiJla37I U+nokNEAz0I5H698tcexVKnvIVjHxH/HCl076gliVHOmUB1oV04eJhYkuenY+q8dPVGL UOW15REaKbMxQoegX6QqMqhCj/Nx/juH9vguuaCiwjwwe8FuAGDBz78KGvjRYyIK3byQ qvaQ== 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 k14si11597568ejg.91.2019.09.11.08.00.37; Wed, 11 Sep 2019 08:01:00 -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 S1728432AbfIKOzy (ORCPT + 99 others); Wed, 11 Sep 2019 10:55:54 -0400 Received: from mx1.emlix.com ([188.40.240.192]:37204 "EHLO mx1.emlix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728182AbfIKOzk (ORCPT ); Wed, 11 Sep 2019 10:55:40 -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 D6CEE5FCFF; Wed, 11 Sep 2019 16:50:00 +0200 (CEST) From: Philipp Puschmann To: linux-kernel@vger.kernel.org Cc: vkoul@kernel.org, dan.j.williams@intel.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, gregkh@linuxfoundation.org, jslaby@suse.com, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, Philipp Puschmann Subject: [PATCH 4/4] dmaengine: imx-sdma: drop redundant variable Date: Wed, 11 Sep 2019 16:49:43 +0200 Message-Id: <20190911144943.21554-5-philipp.puschmann@emlix.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190911144943.21554-1-philipp.puschmann@emlix.com> References: <20190911144943.21554-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 --- 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 6a5a84504858..5b6beeee9f0e 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