Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp22262ybj; Thu, 19 Sep 2019 10:03:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJLWP8Ptr5FQLRaDI6cnHg5DEtvOuIboTMwwgjSwSos8F/KVNXdXJunnv8AParB4rsHxB/ X-Received: by 2002:a05:6402:356:: with SMTP id r22mr14641007edw.254.1568912628265; Thu, 19 Sep 2019 10:03:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568912628; cv=none; d=google.com; s=arc-20160816; b=mJrd/IShqM8Cbk1rZraePAhPBFm3DapDOnYLB8hfRckvQmye859I2bQ7hP+ssM6yi/ +0yPaokyctWuucDmPd1kzXXPnTEPFCc8XzJ4MvlXIMS19MOM4JxcRijWNGHbvQwn4UKW 1bcnQT/7z2KmLJSxdZUR8xpeW6gvEpz1rjYrGCHxYbRRz4bVdV/rv86ZNSP4O7F43Z83 O+dnqSQ8foG1LdqSWWuC1Ak4UsrHDTlK6TAdV70Pp/Ln//UoEKTvXrvlEUOFSrOF3iex FMTpPWAfvOTc4y0qbdYSRc0zZo7ps3X9PChRGxuCWtz+zrkjTbMOh72lexEmiZ/Tu6YY B3sA== 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=Ckt+nj1QgR8bH0mDqyx5i8A5CEfJEmPsQLgCVFW4B3k=; b=H+HNPsq/N6NlouezaAv7sJIR/Lht84sIWXOqRD39Ju17AqlClkJVDmyFsCNYcx59n3 N2p03UbHYvwjnRdepR3Sow6Txu89Vqz0S+/1l1knNzXDIez8dTGmsHJL42cZvIuc9c5q JhrICns7z0M4pn7JsD/J5iZfP3jdfLS5kr0lM1lJJYj2iTtUoVyND+LxtXIwtmYU8trH WezDjxlmyGf/y3fnhAu0pCtON6/MgstXEnk6cxgtQhhxQPGIPeAgzDJylrPrhn5QAhYJ rOb0psIvc28nAX0OWB4g+slsn6npPx32N8BGEKrQuR3EdPYYAHB+if0k44Sgxx3pv+YO eziA== 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 i1si4982948ejc.245.2019.09.19.10.03.24; Thu, 19 Sep 2019 10:03:48 -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 S2390806AbfISO3v (ORCPT + 99 others); Thu, 19 Sep 2019 10:29:51 -0400 Received: from mx1.emlix.com ([188.40.240.192]:58624 "EHLO mx1.emlix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390075AbfISO3s (ORCPT ); Thu, 19 Sep 2019 10:29: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 1B51B60441; Thu, 19 Sep 2019 16:29:47 +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 v4 3/3] dmaengine: imx-sdma: drop redundant variable Date: Thu, 19 Sep 2019 16:29:41 +0200 Message-Id: <20190919142942.12469-4-philipp.puschmann@emlix.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190919142942.12469-1-philipp.puschmann@emlix.com> References: <20190919142942.12469-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,v4: - 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