Skip to contentSkip to conversation

arm :omap :DMA: fix a bug on reserving the omap SDMA channels

PATCH In review [email protected] 4 participants 6 messages Dec 29, 2012 – Jan 3, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm :omap :DMA: fix a bug on reserving the omap SDMA channels

From: ahemaily <[email protected]>

The variable dma_lch_count used for comparison (omap_dma_reserve_channels <= dma_lch_count) before it initialized to the value from omap_dma_dev_attr : d->lch_count.

I change the place of dma_lch_count initialization to be before the comparison.

---
 arch/arm/plat-omap/dma.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-omap/dma.c +2 -2
index c76ed8b..cb3e321 100644
@@ -2014,12 +2014,12 @@ static int __devinit omap_system_dma_probe(struct platform_device *pdev)
 
 	d			= p->dma_attr;
 	errata			= p->errata;
-
+	dma_lch_count           = d->lch_count;
+
 	if ((d->dev_caps & RESERVE_CHANNEL) && omap_dma_reserve_channels
 			&& (omap_dma_reserve_channels <= dma_lch_count))
 		d->lch_count	= omap_dma_reserve_channels;
 
-	dma_lch_count		= d->lch_count;
 	dma_chan_count		= dma_lch_count;
 	dma_chan		= d->chan;
 	enable_1510_mode	= d->dev_caps & ENABLE_1510_MODE;
Signature · 1 line
1.7.9.5
Acked-by on v1 1/1
#1 lore raw

$subject
s/arm:omap/ARM: OMAP:

Quoted 4 lines · On Sunday 30 December 2012 02:13 AM, [email protected] wrote:

From: ahemaily <[email protected]>

The variable dma_lch_count used for comparison (omap_dma_reserve_channels <= dma_lch_count) before it initialized to the value from omap_dma_dev_attr : d->lch_count.

s/it/it is

Quoted 2 lines

I change the place of dma_lch_count initialization to be before the comparison.

s/I change the place of dma_lch_count initialization to be before the comparison./ Initialize dma_lch_count before it is being used for comparison.

Quoted 2 lines

---

Change looks good to my eyes o.w

#2 lore raw

PATCH 1/1 arm :omap :DMA: fix a bug on reserving the omap SDMA channels

sorry for the grammar mistakes.

Regards,,

Quoted 23 lines · Santosh Shilimkar

$subject
s/arm:omap/ARM: OMAP:

Quoted 6 lines · ahemaily at gmail.com

From: ahemaily <[email protected]>

The variable dma_lch_count used for comparison
(omap_dma_reserve_channels <= dma_lch_count)
before it initialized to the value from omap_dma_dev_attr : d->lch_count.

s/it/it is

I change the place of dma_lch_count initialization to be before the

Quoted 3 lines

comparison.

s/I change the place of dma_lch_count initialization to be before the

comparison./ Initialize dma_lch_count before it is being used for comparison.

Quoted 8 lines
Quoted 2 lines

---

Change looks good to my eyes o.w

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121230/cfa88b30/attachment-0001.html>

#3 lore raw
In reply to [email protected]

Hi,

Quoted 18 lines · ahemaily at gmail.com

From: ahemaily <[email protected]>

The variable dma_lch_count used for comparison (omap_dma_reserve_channels <= dma_lch_count) before it initialized to the value from omap_dma_dev_attr : d->lch_count.

I change the place of dma_lch_count initialization to be before the comparison.

---
  arch/arm/plat-omap/dma.c |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-omap/dma.c +0 -0
index c76ed8b..cb3e321 100644
@@ -2014,12 +2014,12 @@ static int __devinit omap_system_dma_probe(struct platform_device *pdev)
 

arch/arm/plat-omap/dma.c static int __devinit omap_system_dma_probe(struct platform_device *pdev) · line 2022

Quoted 10 lines
arch/arm/plat-omap/dma.c +2 -2
  	d			= p->dma_attr;
  	errata			= p->errata;
-
+	dma_lch_count           = d->lch_count;
+
  	if ((d->dev_caps & RESERVE_CHANNEL) && omap_dma_reserve_channels
  			&& (omap_dma_reserve_channels <= dma_lch_count))
  		d->lch_count	= omap_dma_reserve_channels;
 
-	dma_lch_count		= d->lch_count;
    By removing this line, you are effectively not assigning
    d->lch_count after reserving. So the patch should only change
    dma_lch_count in the above "if statement" to d->lch_count

Regards,
Sricharan

#4 lore raw
Quoted 33 lines · R Sricharan

Hi,

Quoted 30 lines · On Sunday 30 December 2012 02:13 AM, [email protected] wrote:

From: ahemaily <[email protected]>

The variable dma_lch_count used for comparison (omap_dma_reserve_channels <= dma_lch_count)
before it initialized to the value from omap_dma_dev_attr : d->lch_count.

I change the place of dma_lch_count initialization to be before the comparison.

---
  arch/arm/plat-omap/dma.c |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-omap/dma.c +2 -1
index c76ed8b..cb3e321 100644
@@ -2014,12 +2014,12 @@ static int __devinit
 omap_system_dma_probe(struct platform_device *pdev)
 
      d            = p->dma_attr;
      errata            = p->errata;
-
+    dma_lch_count           = d->lch_count;
+
      if ((d->dev_caps & RESERVE_CHANNEL) && omap_dma_reserve_channels
              && (omap_dma_reserve_channels <= dma_lch_count))
          d->lch_count    = omap_dma_reserve_channels;
 
Quoted 5 lines

arch/arm/plat-omap/dma.c static int __devinit · line 2023

Quoted 1 line
arch/arm/plat-omap/dma.c +0 -1
-    dma_lch_count        = d->lch_count;
    By removing this line, you are effectively not assigning
    d->lch_count after reserving. So the patch should only change
    dma_lch_count in the above "if statement" to d->lch_count

You are right. I missed it in last review. Below should be enough.

arch/arm/plat-omap/dma.c +1 -1
index 37a488a..555ff7b 100644
@@ -2019,7 +2019,7 @@ static int __devinit omap_system_dma_probe(struct platform_device *pdev)
 	errata			= p->errata;
 
 	if ((d->dev_caps & RESERVE_CHANNEL) && omap_dma_reserve_channels
-			&& (omap_dma_reserve_channels <= dma_lch_count))
+			&& (omap_dma_reserve_channels <= d->lch_coun))
 		d->lch_count	= omap_dma_reserve_channels;
 
 	dma_lch_count		= d->lch_count;
#5 lore raw
Quoted 46 lines · Santosh Shilimkar
Quoted 33 lines · R Sricharan

Hi,

Quoted 30 lines · ahemaily at gmail.com

From: ahemaily <[email protected]>

The variable dma_lch_count used for comparison (omap_dma_reserve_channels <= dma_lch_count)
before it initialized to the value from omap_dma_dev_attr : d->lch_count.

I change the place of dma_lch_count initialization to be before the comparison.

---
  arch/arm/plat-omap/dma.c |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-omap/dma.c +2 -1
index c76ed8b..cb3e321 100644
@@ -2014,12 +2014,12 @@ static int __devinit
 omap_system_dma_probe(struct platform_device *pdev)
 
      d            = p->dma_attr;
      errata            = p->errata;
-
+    dma_lch_count           = d->lch_count;
+
      if ((d->dev_caps & RESERVE_CHANNEL) && omap_dma_reserve_channels
              && (omap_dma_reserve_channels <= dma_lch_count))
          d->lch_count    = omap_dma_reserve_channels;
 
Quoted 5 lines

arch/arm/plat-omap/dma.c static int __devinit · line 2023

Quoted 1 line
arch/arm/plat-omap/dma.c +0 -1
-    dma_lch_count        = d->lch_count;
    By removing this line, you are effectively not assigning
    d->lch_count after reserving. So the patch should only change
    dma_lch_count in the above "if statement" to d->lch_count

You are right. I missed it in last review. Below should be enough.

arch/arm/plat-omap/dma.c +0 -0
index 37a488a..555ff7b 100644

arch/arm/plat-omap/dma.c static int __devinit omap_system_dma_probe(struct platform_device *pdev) · line 2022

Quoted 5 lines
arch/arm/plat-omap/dma.c +1 -1
@@ -2019,7 +2019,7 @@ static int __devinit omap_system_dma_probe(struct platform_device *pdev)
     errata            = p->errata;
 
     if ((d->dev_caps & RESERVE_CHANNEL) && omap_dma_reserve_channels
-            && (omap_dma_reserve_channels <= dma_lch_count))
+            && (omap_dma_reserve_channels <= d->lch_coun))

It looks like the 't' is missing... ^^^^^

Quoted 8 lines
arch/arm/plat-omap/dma.c +0 -0
         d->lch_count    = omap_dma_reserve_channels;
 
     dma_lch_count        = d->lch_count;
Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Regards,
Igor.