A couple of trivial fix on imx-sdma

8 messages, 4 authors, 2011-01-30 · open the first message on its own page

A couple of trivial fix on imx-sdma

From: Shawn Guo <hidden>
Date: 2011-01-17 14:39:22

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

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

From: Shawn Guo <hidden>
Date: 2011-01-17 14:39:23

Signed-off-by: Shawn Guo <redacted>
---
 drivers/dma/imx-sdma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index d5a5d4d..48d0197 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -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)
-- 
1.7.1

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

From: Shawn Guo <hidden>
Date: 2011-01-17 14:39:24

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().

Signed-off-by: Shawn Guo <redacted>
---
 drivers/dma/imx-sdma.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 48d0197..4eb1d29 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -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;
 }
-- 
1.7.1

A couple of trivial fix on imx-sdma

From: s.hauer@pengutronix.de (Sascha Hauer)
Date: 2011-01-17 14:47:09

On Mon, Jan 17, 2011 at 10:39:22PM +0800, Shawn Guo wrote:
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 [off-list ref]

Sascha

-- 
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 |

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

From: Uwe Kleine-König <hidden>
Date: 2011-01-17 18:28:30

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

On Mon, Jan 17, 2011 at 10:39:23PM +0800, Shawn Guo wrote:
quoted hunk
Signed-off-by: Shawn Guo <redacted>
---
 drivers/dma/imx-sdma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index d5a5d4d..48d0197 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -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)
-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

From: Uwe Kleine-König <hidden>
Date: 2011-01-19 07:44:41

On Wed, Jan 19, 2011 at 07:13:06PM +0800, Shawn Guo wrote:
Signed-off-by: Shawn Guo <redacted>
Acked-by: Uwe Kleine-K?nig <redacted>
quoted hunk
---
 drivers/dma/imx-sdma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index d5a5d4d..48d0197 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -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)
-- 
1.7.1



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

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

From: Shawn Guo <hidden>
Date: 2011-01-19 11:13:06

Signed-off-by: Shawn Guo <redacted>
---
 drivers/dma/imx-sdma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index d5a5d4d..48d0197 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -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)
-- 
1.7.1

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

From: Dan Williams <hidden>
Date: 2011-01-30 06:20:26

On Mon, Jan 17, 2011 at 6:39 AM, Shawn Guo [off-list ref] wrote:
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().

Signed-off-by: Shawn Guo <redacted>
---
Patch 1 and 2 applied.

Thanks,
Dan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help