* [3/3] dmaengine: imx-sdma: remove unused variable
@ 2018-07-02 13:19 Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2018-07-02 13:19 UTC (permalink / raw)
To: dmaengine; +Cc: Robin Gong, Sascha Hauer, Lucas Stach, Vinod Koul
The variable is no longer used, though it is set, so remove it
drivers/dma/imx-sdma.c:1298:6:
warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
int ret, i, count;
^~~
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
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 dfd1fbbe7ba8..b78146b4ea01 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -1295,7 +1295,7 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg(
{
struct sdma_channel *sdmac = to_sdma_chan(chan);
struct sdma_engine *sdma = sdmac->sdma;
- int ret, i, count;
+ int i, count;
int channel = sdmac->channel;
struct scatterlist *sg;
struct sdma_desc *desc;
@@ -1318,17 +1318,14 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg(
if (count > 0xffff) {
dev_err(sdma->dev, "SDMA channel %d: maximum bytes for sg entry exceeded: %d > %d\n",
channel, count, 0xffff);
- ret = -EINVAL;
goto err_bd_out;
}
bd->mode.count = count;
desc->chn_count += count;
- if (sdmac->word_size > DMA_SLAVE_BUSWIDTH_4_BYTES) {
- ret = -EINVAL;
+ if (sdmac->word_size > DMA_SLAVE_BUSWIDTH_4_BYTES)
goto err_bd_out;
- }
switch (sdmac->word_size) {
case DMA_SLAVE_BUSWIDTH_4_BYTES:
^ permalink raw reply related [flat|nested] 2+ messages in thread* [3/3] dmaengine: imx-sdma: remove unused variable
@ 2018-07-03 0:58 Robin Gong
0 siblings, 0 replies; 2+ messages in thread
From: Robin Gong @ 2018-07-03 0:58 UTC (permalink / raw)
To: Vinod Koul, dmaengine@vger.kernel.org; +Cc: Sascha Hauer, Lucas Stach
Acked-by: Robin Gong <yibin.gong@nxp.com>
-----Original Message-----
From: Vinod Koul [mailto:vkoul@kernel.org]
Sent: 2018年7月2日 21:20
To: dmaengine@vger.kernel.org
Cc: Robin Gong <yibin.gong@nxp.com>; Sascha Hauer <s.hauer@pengutronix.de>; Lucas Stach <l.stach@pengutronix.de>; Vinod Koul <vkoul@kernel.org>
Subject: [PATCH 3/3] dmaengine: imx-sdma: remove unused variable
The variable is no longer used, though it is set, so remove it
drivers/dma/imx-sdma.c:1298:6:
warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
int ret, i, count;
^~~
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
drivers/dma/imx-sdma.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
if (count > 0xffff) {
dev_err(sdma->dev, "SDMA channel %d: maximum bytes for sg entry exceeded: %d > %d\n",
channel, count, 0xffff);
- ret = -EINVAL;
goto err_bd_out;
}
bd->mode.count = count;
desc->chn_count += count;
- if (sdmac->word_size > DMA_SLAVE_BUSWIDTH_4_BYTES) {
- ret = -EINVAL;
+ if (sdmac->word_size > DMA_SLAVE_BUSWIDTH_4_BYTES)
goto err_bd_out;
- }
switch (sdmac->word_size) {
case DMA_SLAVE_BUSWIDTH_4_BYTES:
--
2.14.4
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index dfd1fbbe7ba8..b78146b4ea01 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -1295,7 +1295,7 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg( {
struct sdma_channel *sdmac = to_sdma_chan(chan);
struct sdma_engine *sdma = sdmac->sdma;
- int ret, i, count;
+ int i, count;
int channel = sdmac->channel;
struct scatterlist *sg;
struct sdma_desc *desc;
@@ -1318,17 +1318,14 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg(
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-03 0:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-02 13:19 [3/3] dmaengine: imx-sdma: remove unused variable Vinod Koul
-- strict thread matches above, loose matches on Subject: below --
2018-07-03 0:58 Robin Gong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox