Skip to contentSkip to conversation

A couple of trivial fix on imx-sdma

PATCH New Shawn Guo 4 participants 8 messages Jan 17, 2011 – Jan 30, 2011

Subsystems (2)
lore
Share & tools
lore

Shawn Guo

author
#0 lore raw

I'm studying imx-sdma code to implement mxs dma engine. The patch set is to fix a couple trivial problems seen in the study.

[PATCH 1/2] dmaengine: imx-sdma: fix return of sdma_probe()
[PATCH 2/2] dmaengine: imx-sdma: fix inconsistent naming in sdma_assign_cookie()

Regards,
Shawn

author
#1 lore raw

PATCH 1/2 dmaengine: imx-sdma: fix return of sdma_probe()

---
 drivers/dma/imx-sdma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/dma/imx-sdma.c +1 -1
index d5a5d4d..48d0197 100644
@@ -1348,7 +1348,7 @@ err_clk:
 err_request_region:
 err_irq:
 	kfree(sdma);
-	return 0;
+	return ret;
 }
 
 static int __exit sdma_remove(struct platform_device *pdev)
Signature · 1 line
1.7.1
#2 lore raw

PATCH 1/2 dmaengine: imx-sdma: fix return of sdma_probe()

If you make the commit log read something like:

dmaengine: imx-sdma: propagate error in sdma_probe instead of returning 0

you can have my ack.

Uwe

Quoted 18 lines · Shawn Guo
---
 drivers/dma/imx-sdma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/dma/imx-sdma.c +1 -1
index d5a5d4d..48d0197 100644
@@ -1348,7 +1348,7 @@ err_clk:
 err_request_region:
 err_irq:
 	kfree(sdma);
-	return 0;
+	return ret;
 }
 
 static int __exit sdma_remove(struct platform_device *pdev)
Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
author
#3 lore raw

PATCH 2/2 dmaengine: imx-sdma: fix inconsistent naming in sdma_assign_cookie()

In reply to Shawn Guo

Variable name sdma and sdmac are consistently used as the pointer to sdma_engine and sdma_channel respectively throughout the file. The patch fixes the inconsistency seen in function sdma_assign_cookie().

---
 drivers/dma/imx-sdma.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/dma/imx-sdma.c +4 -4
index 48d0197..4eb1d29 100644
@@ -770,15 +770,15 @@ static void sdma_enable_channel(struct sdma_engine *sdma, int channel)
 	__raw_writel(1 << channel, sdma->regs + SDMA_H_START);
 }
 
-static dma_cookie_t sdma_assign_cookie(struct sdma_channel *sdma)
+static dma_cookie_t sdma_assign_cookie(struct sdma_channel *sdmac)
 {
-	dma_cookie_t cookie = sdma->chan.cookie;
+	dma_cookie_t cookie = sdmac->chan.cookie;
 
 	if (++cookie < 0)
 		cookie = 1;
 
-	sdma->chan.cookie = cookie;
-	sdma->desc.cookie = cookie;
+	sdmac->chan.cookie = cookie;
+	sdmac->desc.cookie = cookie;
 
 	return cookie;
 }
Signature · 1 line
1.7.1
#4 lore raw

PATCH 2/2 dmaengine: imx-sdma: fix inconsistent naming in sdma_assign_cookie()

Quoted 6 lines · Shawn Guo

Variable name sdma and sdmac are consistently used as the pointer to sdma_engine and sdma_channel respectively throughout the file. ?The patch fixes the inconsistency seen in function sdma_assign_cookie().

---

Patch 1 and 2 applied.

Thanks,
Dan

maintainer
#5 lore raw
In reply to Shawn Guo
Quoted 5 lines · Shawn Guo

I'm studying imx-sdma code to implement mxs dma engine. The patch set is to fix a couple trivial problems seen in the study.

[PATCH 1/2] dmaengine: imx-sdma: fix return of sdma_probe()
[PATCH 2/2] dmaengine: imx-sdma: fix inconsistent naming in sdma_assign_cookie()

both Acked-by: Sascha Hauer <[email protected]>

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
author
#6 lore raw

PATCH v2 1/2 dmaengine: imx-sdma: propagate error in sdma_probe() instead of returning 0

In reply to Shawn Guo
---
 drivers/dma/imx-sdma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/dma/imx-sdma.c +1 -1
index d5a5d4d..48d0197 100644
@@ -1348,7 +1348,7 @@ err_clk:
 err_request_region:
 err_irq:
 	kfree(sdma);
-	return 0;
+	return ret;
 }
 
 static int __exit sdma_remove(struct platform_device *pdev)
Signature · 1 line
1.7.1
#7 lore raw

PATCH v2 1/2 dmaengine: imx-sdma: propagate error in sdma_probe() instead of returning 0

Quoted 1 line · Shawn Guo
Quoted 27 lines
---
 drivers/dma/imx-sdma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/dma/imx-sdma.c +1 -1
index d5a5d4d..48d0197 100644
@@ -1348,7 +1348,7 @@ err_clk:
 err_request_region:
 err_irq:
 	kfree(sdma);
-	return 0;
+	return ret;
 }
 
 static int __exit sdma_remove(struct platform_device *pdev)
Signature · 8 lines
1.7.1



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |