arm :omap :DMA: fix a bug on reserving the omap SDMA channels
Subsystems (2)
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
@@ -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
$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_countused for comparison (omap_dma_reserve_channels<=dma_lch_count) before it initialized to the value fromomap_dma_dev_attr:d->lch_count.
s/it/it is
Quoted 2 lines
I change the place of
dma_lch_countinitialization 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
Signed-off-by Abdelrahman Hemaily <[email protected]>---
Change looks good to my eyes o.w
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_countused for comparison
(omap_dma_reserve_channels<=dma_lch_count)
before it initialized to the value fromomap_dma_dev_attr:d->lch_count.s/it/it is
I change the place of
dma_lch_countinitialization to be before theQuoted 3 lines
comparison.
s/I change the place of
dma_lch_countinitialization to be before thecomparison./ Initialize
dma_lch_countbefore it is being used for comparison.
Quoted 8 lines
Signed-off-by Abdelrahman Hemaily <[email protected]>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>
Hi,
Quoted 18 lines · ahemaily at gmail.com
From: ahemaily <[email protected]>
The variable
dma_lch_countused for comparison (omap_dma_reserve_channels<=dma_lch_count) before it initialized to the value fromomap_dma_dev_attr:d->lch_count.I change the place of
dma_lch_countinitialization to be before the comparison.Signed-off-by Abdelrahman Hemaily <[email protected]>--- arch/arm/plat-omap/dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm/plat-omap/dma.c +0
-0@@ -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
-2d = 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_countRegards,
Sricharan
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_countused for comparison (omap_dma_reserve_channels<=dma_lch_count)
before it initialized to the value fromomap_dma_dev_attr:d->lch_count.I change the place of
dma_lch_countinitialization to be before the comparison.Signed-off-by Abdelrahman Hemaily <[email protected]>--- arch/arm/plat-omap/dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm/plat-omap/dma.c +2
-1@@ -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
@@ -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;
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_countused for comparison (omap_dma_reserve_channels<=dma_lch_count)
before it initialized to the value fromomap_dma_dev_attr:d->lch_count.I change the place of
dma_lch_countinitialization to be before the comparison.Signed-off-by Abdelrahman Hemaily <[email protected]>--- arch/arm/plat-omap/dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm/plat-omap/dma.c +2
-1@@ -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_countYou are right. I missed it in last review. Below should be enough.
arch/arm/plat-omap/dma.c +0
-0
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
-0d->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.