linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] arm :omap :DMA: fix a bug on reserving the omap SDMA channels
@ 2012-12-29 20:43 ahemaily at gmail.com
  2012-12-30  6:24 ` Santosh Shilimkar
  2013-01-03  7:28 ` R Sricharan
  0 siblings, 2 replies; 6+ messages in thread
From: ahemaily at gmail.com @ 2012-12-29 20:43 UTC (permalink / raw)
  To: linux-arm-kernel

From: ahemaily <ahemaily@gmail.com>

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.

Signed-off-by: Abdelrahman Hemaily <ahemaily@gmail.com>
---
 arch/arm/plat-omap/dma.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index c76ed8b..cb3e321 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -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;
-- 
1.7.9.5

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

* [PATCH 1/1] arm :omap :DMA: fix a bug on reserving the omap SDMA channels
  2012-12-29 20:43 [PATCH 1/1] arm :omap :DMA: fix a bug on reserving the omap SDMA channels ahemaily at gmail.com
@ 2012-12-30  6:24 ` Santosh Shilimkar
  2012-12-30 13:09   ` Abdulrahman Hemaily
  2013-01-03  7:28 ` R Sricharan
  1 sibling, 1 reply; 6+ messages in thread
From: Santosh Shilimkar @ 2012-12-30  6:24 UTC (permalink / raw)
  To: linux-arm-kernel

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

On Sunday 30 December 2012 02:13 AM, ahemaily at gmail.com wrote:
> From: ahemaily <ahemaily@gmail.com>
>
> 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 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.

> Signed-off-by: Abdelrahman Hemaily <ahemaily@gmail.com>
> ---
Change looks good to my eyes o.w

Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

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

* [PATCH 1/1] arm :omap :DMA: fix a bug on reserving the omap SDMA channels
  2012-12-30  6:24 ` Santosh Shilimkar
@ 2012-12-30 13:09   ` Abdulrahman Hemaily
  0 siblings, 0 replies; 6+ messages in thread
From: Abdulrahman Hemaily @ 2012-12-30 13:09 UTC (permalink / raw)
  To: linux-arm-kernel

sorry for the grammar mistakes.

Regards,,

On 30 December 2012 08:24, Santosh Shilimkar <santosh.shilimkar@ti.com>wrote:

> $subject
> s/arm:omap/ARM: OMAP:
>
>
> On Sunday 30 December 2012 02:13 AM, ahemaily at gmail.com wrote:
>
>> From: ahemaily <ahemaily@gmail.com>
>>
>> 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
>> 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.
>
>
>  Signed-off-by: Abdelrahman Hemaily <ahemaily@gmail.com>
>> ---
>>
> Change looks good to my eyes o.w
>
> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121230/cfa88b30/attachment-0001.html>

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

* [PATCH 1/1] arm :omap :DMA: fix a bug on reserving the omap SDMA channels
  2012-12-29 20:43 [PATCH 1/1] arm :omap :DMA: fix a bug on reserving the omap SDMA channels ahemaily at gmail.com
  2012-12-30  6:24 ` Santosh Shilimkar
@ 2013-01-03  7:28 ` R Sricharan
  2013-01-03  8:38   ` Santosh Shilimkar
  1 sibling, 1 reply; 6+ messages in thread
From: R Sricharan @ 2013-01-03  7:28 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Sunday 30 December 2012 02:13 AM, ahemaily at gmail.com wrote:
> From: ahemaily <ahemaily@gmail.com>
>
> 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.
>
> Signed-off-by: Abdelrahman Hemaily <ahemaily@gmail.com>
> ---
>   arch/arm/plat-omap/dma.c |    4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
> index c76ed8b..cb3e321 100644
> --- a/arch/arm/plat-omap/dma.c
> +++ b/arch/arm/plat-omap/dma.c
> @@ -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;
    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

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

* [PATCH 1/1] arm :omap :DMA: fix a bug on reserving the omap SDMA channels
  2013-01-03  7:28 ` R Sricharan
@ 2013-01-03  8:38   ` Santosh Shilimkar
  2013-01-03  9:10     ` Igor Grinberg
  0 siblings, 1 reply; 6+ messages in thread
From: Santosh Shilimkar @ 2013-01-03  8:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday 03 January 2013 12:58 PM, R Sricharan wrote:
> Hi,
>
> On Sunday 30 December 2012 02:13 AM, ahemaily at gmail.com wrote:
>> From: ahemaily <ahemaily@gmail.com>
>>
>> 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.
>>
>> Signed-off-by: Abdelrahman Hemaily <ahemaily@gmail.com>
>> ---
>>   arch/arm/plat-omap/dma.c |    4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
>> index c76ed8b..cb3e321 100644
>> --- a/arch/arm/plat-omap/dma.c
>> +++ b/arch/arm/plat-omap/dma.c
>> @@ -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;
>     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.

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 37a488a..555ff7b 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -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;

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

* [PATCH 1/1] arm :omap :DMA: fix a bug on reserving the omap SDMA channels
  2013-01-03  8:38   ` Santosh Shilimkar
@ 2013-01-03  9:10     ` Igor Grinberg
  0 siblings, 0 replies; 6+ messages in thread
From: Igor Grinberg @ 2013-01-03  9:10 UTC (permalink / raw)
  To: linux-arm-kernel

On 01/03/13 10:38, Santosh Shilimkar wrote:
> On Thursday 03 January 2013 12:58 PM, R Sricharan wrote:
>> Hi,
>>
>> On Sunday 30 December 2012 02:13 AM, ahemaily at gmail.com wrote:
>>> From: ahemaily <ahemaily@gmail.com>
>>>
>>> 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.
>>>
>>> Signed-off-by: Abdelrahman Hemaily <ahemaily@gmail.com>
>>> ---
>>>   arch/arm/plat-omap/dma.c |    4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
>>> index c76ed8b..cb3e321 100644
>>> --- a/arch/arm/plat-omap/dma.c
>>> +++ b/arch/arm/plat-omap/dma.c
>>> @@ -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;
>>     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.
> 
> diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
> index 37a488a..555ff7b 100644
> --- a/arch/arm/plat-omap/dma.c
> +++ b/arch/arm/plat-omap/dma.c
> @@ -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...                     ^^^^^

>          d->lch_count    = omap_dma_reserve_channels;
> 
>      dma_lch_count        = d->lch_count;
> -- 
> 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
> 

-- 
Regards,
Igor.

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

end of thread, other threads:[~2013-01-03  9:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-29 20:43 [PATCH 1/1] arm :omap :DMA: fix a bug on reserving the omap SDMA channels ahemaily at gmail.com
2012-12-30  6:24 ` Santosh Shilimkar
2012-12-30 13:09   ` Abdulrahman Hemaily
2013-01-03  7:28 ` R Sricharan
2013-01-03  8:38   ` Santosh Shilimkar
2013-01-03  9:10     ` Igor Grinberg

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