Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp868099ybn; Tue, 24 Sep 2019 10:46:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyIlG2ZcDKnahfvPkj7sGPYnTnfjIvKoYSdXGydqsWJKH37WVhvhNzRRvrkZDgXmJb8YBLG X-Received: by 2002:adf:f8cf:: with SMTP id f15mr3507443wrq.292.1569347190380; Tue, 24 Sep 2019 10:46:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569347190; cv=none; d=google.com; s=arc-20160816; b=bJDiVTiKdCwgYN6bT/WfXH0jRsEywq3ROq7+3GWJI2X8FjPSfzXK9b5y4ZJaxxHUNG DjxcweTOlF+vcx3A2sKjqFIdztS7KIdybX4o0fk+faklDllyoN9TGCwHjDPxb5GyM/uG AUxJz6LQuLErQsUTr+tzNBrCpqT97SMIJMTOzd354N46pdZOTbRjRPWgTVQmJXIwWKSK wlYF50IP5tpxMX5oqygL6unp+0gEkunr4GieOUIg7SL5GPNiewDqQaIwOsk0GrZuNZWa bav8VeFIW0B1j5iv3Zumaf6r7+8/o8co2QMcRhqTAbYaA4t+P2GaSCu58OzGrwdIys76 ZWMg== 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=M0/UpEvesPjdh1pQErdAJIDHGbLYnh6L9d1mCEJQtV8=; b=NmKBUMcF9+l96OtMSP1pNV4hIniW2a1NEG0+5A3NudHE9OUJQIVdqXualxmPMKPPEV kj3jlbdhHMq8maz5U9C0wujd4BS3EdWijC/QnyjZJt6JOD10HrCoSzdL5uv8l0SjRa7x TrAHltMTTM5HWUJao1bm2wx0UbOlrlfcovQoba5/OIHHVz4A3Zpw8NWkCZ2Rd5eugz4X Kfs+0gBt0nwy+vYqFRaKOkK2f923MmQhJSFx3S2FUJq3aLSyxgY/8oImGx53HWGqtLPE Twv0zSHYkIOOukrbTf1hskNU1qFXVW2abgfm2tTlKvTMBPidJuQ1ajWX/ULhdaEYkxgc QAgQ== 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 a33si1652192edf.121.2019.09.24.10.46.06; Tue, 24 Sep 2019 10:46:30 -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 S2408293AbfIWN6S (ORCPT + 99 others); Mon, 23 Sep 2019 09:58:18 -0400 Received: from mx1.emlix.com ([188.40.240.192]:42132 "EHLO mx1.emlix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408206AbfIWN6Q (ORCPT ); Mon, 23 Sep 2019 09:58:16 -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 57A3C600FF; Mon, 23 Sep 2019 15:58:14 +0200 (CEST) From: Philipp Puschmann To: linux-kernel@vger.kernel.org Cc: jlu@pengutronix.de, 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.org, linux-arm-kernel@lists.infradead.org, Philipp Puschmann Subject: [PATCH v5 3/3] dmaengine: imx-sdma: drop redundant variable Date: Mon, 23 Sep 2019 15:58:08 +0200 Message-Id: <20190923135808.815-4-philipp.puschmann@emlix.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190923135808.815-1-philipp.puschmann@emlix.com> References: <20190923135808.815-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,v5: - 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 0b1d6a62423d..0d62664e534e 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1549,7 +1549,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); @@ -1570,7 +1570,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; @@ -1597,9 +1597,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