All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Grinberg <grinberg@compulab.co.il>
To: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: R Sricharan <r.sricharan@ti.com>,
	ahemaily@gmail.com, tony@atomide.com, linux-omap@vger.kernel.org,
	linux@arm.linux.org.uk, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/1] arm :omap :DMA: fix a bug on reserving the omap SDMA channels
Date: Thu, 03 Jan 2013 11:10:12 +0200	[thread overview]
Message-ID: <50E54AF4.4030405@compulab.co.il> (raw)
In-Reply-To: <50E5438A.1050902@ti.com>

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@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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-- 
Regards,
Igor.

WARNING: multiple messages have this Message-ID (diff)
From: grinberg@compulab.co.il (Igor Grinberg)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] arm :omap :DMA: fix a bug on reserving the omap SDMA channels
Date: Thu, 03 Jan 2013 11:10:12 +0200	[thread overview]
Message-ID: <50E54AF4.4030405@compulab.co.il> (raw)
In-Reply-To: <50E5438A.1050902@ti.com>

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.

  reply	other threads:[~2013-01-03  9:10 UTC|newest]

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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50E54AF4.4030405@compulab.co.il \
    --to=grinberg@compulab.co.il \
    --cc=ahemaily@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=r.sricharan@ti.com \
    --cc=santosh.shilimkar@ti.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.