[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190923135808.815-4-philipp.puschmann@emlix.com>
Date: Mon, 23 Sep 2019 15:58:08 +0200
From: Philipp Puschmann <philipp.puschmann@...ix.com>
To: linux-kernel@...r.kernel.org
Cc: jlu@...gutronix.de, yibin.gong@....com, fugang.duan@....com,
l.stach@...gutronix.de, dan.j.williams@...el.com, vkoul@...nel.org,
shawnguo@...nel.org, s.hauer@...gutronix.de, kernel@...gutronix.de,
festevam@...il.com, linux-imx@....com, dmaengine@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
Philipp Puschmann <philipp.puschmann@...ix.com>
Subject: [PATCH v5 3/3] dmaengine: imx-sdma: drop redundant variable
In sdma_prep_dma_cyclic buf is redundant. Drop it.
Signed-off-by: Philipp Puschmann <philipp.puschmann@...ix.com>
Reviewed-by: Lucas Stach <l.stach@...gutronix.de>
---
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
Powered by blists - more mailing lists