linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* A couple of trivial fix on imx-sdma
@ 2011-01-17 14:39 Shawn Guo
  2011-01-17 14:39 ` [PATCH 1/2] dmaengine: imx-sdma: fix return of sdma_probe() Shawn Guo
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Shawn Guo @ 2011-01-17 14:39 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] dmaengine: imx-sdma: fix return of sdma_probe()
  2011-01-17 14:39 A couple of trivial fix on imx-sdma Shawn Guo
@ 2011-01-17 14:39 ` Shawn Guo
  2011-01-17 18:28   ` Uwe Kleine-König
  2011-01-17 14:39 ` [PATCH 2/2] dmaengine: imx-sdma: fix inconsistent naming in sdma_assign_cookie() Shawn Guo
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Shawn Guo @ 2011-01-17 14:39 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
---
 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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] dmaengine: imx-sdma: fix inconsistent naming in sdma_assign_cookie()
  2011-01-17 14:39 A couple of trivial fix on imx-sdma Shawn Guo
  2011-01-17 14:39 ` [PATCH 1/2] dmaengine: imx-sdma: fix return of sdma_probe() Shawn Guo
@ 2011-01-17 14:39 ` Shawn Guo
  2011-01-30  6:20   ` Dan Williams
  2011-01-17 14:47 ` A couple of trivial fix on imx-sdma Sascha Hauer
  2011-01-19 11:13 ` [PATCH v2 1/2] dmaengine: imx-sdma: propagate error in sdma_probe() instead of returning 0 Shawn Guo
  3 siblings, 1 reply; 8+ messages in thread
From: Shawn Guo @ 2011-01-17 14:39 UTC (permalink / raw)
  To: linux-arm-kernel

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 <shawn.guo@freescale.com>
---
 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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* A couple of trivial fix on imx-sdma
  2011-01-17 14:39 A couple of trivial fix on imx-sdma Shawn Guo
  2011-01-17 14:39 ` [PATCH 1/2] dmaengine: imx-sdma: fix return of sdma_probe() Shawn Guo
  2011-01-17 14:39 ` [PATCH 2/2] dmaengine: imx-sdma: fix inconsistent naming in sdma_assign_cookie() Shawn Guo
@ 2011-01-17 14:47 ` Sascha Hauer
  2011-01-19 11:13 ` [PATCH v2 1/2] dmaengine: imx-sdma: propagate error in sdma_probe() instead of returning 0 Shawn Guo
  3 siblings, 0 replies; 8+ messages in thread
From: Sascha Hauer @ 2011-01-17 14:47 UTC (permalink / raw)
  To: linux-arm-kernel

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 <s.hauer@pengutronix.de>

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 |

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] dmaengine: imx-sdma: fix return of sdma_probe()
  2011-01-17 14:39 ` [PATCH 1/2] dmaengine: imx-sdma: fix return of sdma_probe() Shawn Guo
@ 2011-01-17 18:28   ` Uwe Kleine-König
  0 siblings, 0 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2011-01-17 18:28 UTC (permalink / raw)
  To: linux-arm-kernel

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:
> Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
> ---
>  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/  |

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 1/2] dmaengine: imx-sdma: propagate error in sdma_probe() instead of returning 0
  2011-01-19 11:13 ` [PATCH v2 1/2] dmaengine: imx-sdma: propagate error in sdma_probe() instead of returning 0 Shawn Guo
@ 2011-01-19  7:44   ` Uwe Kleine-König
  0 siblings, 0 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2011-01-19  7:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 19, 2011 at 07:13:06PM +0800, Shawn Guo wrote:
> Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 1/2] dmaengine: imx-sdma: propagate error in sdma_probe() instead of returning 0
  2011-01-17 14:39 A couple of trivial fix on imx-sdma Shawn Guo
                   ` (2 preceding siblings ...)
  2011-01-17 14:47 ` A couple of trivial fix on imx-sdma Sascha Hauer
@ 2011-01-19 11:13 ` Shawn Guo
  2011-01-19  7:44   ` Uwe Kleine-König
  3 siblings, 1 reply; 8+ messages in thread
From: Shawn Guo @ 2011-01-19 11:13 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
---
 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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] dmaengine: imx-sdma: fix inconsistent naming in sdma_assign_cookie()
  2011-01-17 14:39 ` [PATCH 2/2] dmaengine: imx-sdma: fix inconsistent naming in sdma_assign_cookie() Shawn Guo
@ 2011-01-30  6:20   ` Dan Williams
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Williams @ 2011-01-30  6:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jan 17, 2011 at 6:39 AM, Shawn Guo <shawn.guo@freescale.com> 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 <shawn.guo@freescale.com>
> ---

Patch 1 and 2 applied.

Thanks,
Dan

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-01-30  6:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-17 14:39 A couple of trivial fix on imx-sdma Shawn Guo
2011-01-17 14:39 ` [PATCH 1/2] dmaengine: imx-sdma: fix return of sdma_probe() Shawn Guo
2011-01-17 18:28   ` Uwe Kleine-König
2011-01-17 14:39 ` [PATCH 2/2] dmaengine: imx-sdma: fix inconsistent naming in sdma_assign_cookie() Shawn Guo
2011-01-30  6:20   ` Dan Williams
2011-01-17 14:47 ` A couple of trivial fix on imx-sdma Sascha Hauer
2011-01-19 11:13 ` [PATCH v2 1/2] dmaengine: imx-sdma: propagate error in sdma_probe() instead of returning 0 Shawn Guo
2011-01-19  7:44   ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).