* [PATCH] arch/arm/plat-omap: initializing dma_lch_count, before judging omap_dma_reserve_channels
@ 2013-01-10 10:29 Chen Gang
2013-01-10 10:48 ` Santosh Shilimkar
0 siblings, 1 reply; 10+ messages in thread
From: Chen Gang @ 2013-01-10 10:29 UTC (permalink / raw)
To: tony, linux; +Cc: linux-omap, linux-arm-kernel
dma_lch_count is zero before 1st call of omap_system_dma_probe.
omap_dma_reserve_channels has value before 1st call of omap_system_dma_probe
when 1st call of omap_system_dma_probe
we need set dma_lch_count before use it for judging
or which will be failed for omap_dma_reserve_channels
additional info:
this patch is only for fixing bug, not touch the features.
so, not use d->lch_count instead of dma_lch_count for the statement:
&& (omap_dma_reserve_channels <= dma_lch_count))
at least, now, current fixing is equal to above.
in the future
maybe omap_dma_reserve_channels can be set by outside (such as from /proc)
dma_lch_count is a static global variable which has effect to all devices.
maybe the original author do not hope the newer is larger than the older
Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
arch/arm/plat-omap/dma.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 4136b20..b382eef 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -2018,6 +2018,9 @@ static int omap_system_dma_probe(struct platform_device *pdev)
d = p->dma_attr;
errata = p->errata;
+ if (!dma_lch_count)
+ 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;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] arch/arm/plat-omap: initializing dma_lch_count, before judging omap_dma_reserve_channels
2013-01-10 10:29 [PATCH] arch/arm/plat-omap: initializing dma_lch_count, before judging omap_dma_reserve_channels Chen Gang
@ 2013-01-10 10:48 ` Santosh Shilimkar
2013-01-10 10:51 ` Santosh Shilimkar
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Santosh Shilimkar @ 2013-01-10 10:48 UTC (permalink / raw)
To: Chen Gang; +Cc: tony, linux, linux-omap, linux-arm-kernel
On Thursday 10 January 2013 03:59 PM, Chen Gang wrote:
>
> dma_lch_count is zero before 1st call of omap_system_dma_probe.
> omap_dma_reserve_channels has value before 1st call of omap_system_dma_probe
>
> when 1st call of omap_system_dma_probe
> we need set dma_lch_count before use it for judging
> or which will be failed for omap_dma_reserve_channels
>
> additional info:
> this patch is only for fixing bug, not touch the features.
> so, not use d->lch_count instead of dma_lch_count for the statement:
>
> && (omap_dma_reserve_channels <= dma_lch_count))
>
Why not ? Infact thats the right fix as mentioned in the review.
> at least, now, current fixing is equal to above.
> in the future
> maybe omap_dma_reserve_channels can be set by outside (such as from /proc)
> dma_lch_count is a static global variable which has effect to all devices.
> maybe the original author do not hope the newer is larger than the older
>
'omap_dma_reserve_channels' when used is suppose to be from command
line. Hence the proposed fix in the review is the right one.
Regards
santosh
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] arch/arm/plat-omap: initializing dma_lch_count, before judging omap_dma_reserve_channels
2013-01-10 10:48 ` Santosh Shilimkar
@ 2013-01-10 10:51 ` Santosh Shilimkar
2013-01-11 5:09 ` Chen Gang
2013-01-11 5:03 ` Chen Gang
2013-01-11 5:39 ` [PATCH] ARM: OMAP: Fix the use of uninitialized dma_lch_count Chen Gang
2 siblings, 1 reply; 10+ messages in thread
From: Santosh Shilimkar @ 2013-01-10 10:51 UTC (permalink / raw)
To: Chen Gang; +Cc: tony, linux, linux-omap, linux-arm-kernel
On Thursday 10 January 2013 04:18 PM, Santosh Shilimkar wrote:
> On Thursday 10 January 2013 03:59 PM, Chen Gang wrote:
>>
>> dma_lch_count is zero before 1st call of omap_system_dma_probe.
>> omap_dma_reserve_channels has value before 1st call of
>> omap_system_dma_probe
>>
>> when 1st call of omap_system_dma_probe
>> we need set dma_lch_count before use it for judging
>> or which will be failed for omap_dma_reserve_channels
>>
>> additional info:
>> this patch is only for fixing bug, not touch the features.
>> so, not use d->lch_count instead of dma_lch_count for the statement:
>>
>> && (omap_dma_reserve_channels <= dma_lch_count))
>>
> Why not ? Infact thats the right fix as mentioned in the review.
>
>> at least, now, current fixing is equal to above.
>> in the future
>> maybe omap_dma_reserve_channels can be set by outside (such as
>> from /proc)
>> dma_lch_count is a static global variable which has effect to
>> all devices.
>> maybe the original author do not hope the newer is larger than
>> the older
>>
> 'omap_dma_reserve_channels' when used is suppose to be from command
> line. Hence the proposed fix in the review is the right one.
>
Another thing. please fix the subject line. It should be something like
below.
ARM: OMAP: Fix the use of uninitialized dma_lch_count
Regards
santosh
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] arch/arm/plat-omap: initializing dma_lch_count, before judging omap_dma_reserve_channels
2013-01-10 10:48 ` Santosh Shilimkar
2013-01-10 10:51 ` Santosh Shilimkar
@ 2013-01-11 5:03 ` Chen Gang
2013-01-11 7:26 ` Santosh Shilimkar
2013-01-11 5:39 ` [PATCH] ARM: OMAP: Fix the use of uninitialized dma_lch_count Chen Gang
2 siblings, 1 reply; 10+ messages in thread
From: Chen Gang @ 2013-01-11 5:03 UTC (permalink / raw)
To: Santosh Shilimkar; +Cc: tony, linux, linux-omap, linux-arm-kernel
于 2013年01月10日 18:48, Santosh Shilimkar 写道:
> 'omap_dma_reserve_channels' when used is suppose to be from command
> line. Hence the proposed fix in the review is the right one.
ok, thank you for your suggestion.
I will send patch v2, also mark you as Signed-of-by.
:-)
--
Chen Gang
Asianux Corporation
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] arch/arm/plat-omap: initializing dma_lch_count, before judging omap_dma_reserve_channels
2013-01-10 10:51 ` Santosh Shilimkar
@ 2013-01-11 5:09 ` Chen Gang
0 siblings, 0 replies; 10+ messages in thread
From: Chen Gang @ 2013-01-11 5:09 UTC (permalink / raw)
To: Santosh Shilimkar; +Cc: tony, linux, linux-omap, linux-arm-kernel
于 2013年01月10日 18:51, Santosh Shilimkar 写道:
> Another thing. please fix the subject line. It should be something like
> below.
>
> ARM: OMAP: Fix the use of uninitialized dma_lch_count
ok, thank you for your suggestion
I will use it as subject for patch v2.
:-)
--
Chen Gang
Asianux Corporation
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] ARM: OMAP: Fix the use of uninitialized dma_lch_count
2013-01-10 10:48 ` Santosh Shilimkar
2013-01-10 10:51 ` Santosh Shilimkar
2013-01-11 5:03 ` Chen Gang
@ 2013-01-11 5:39 ` Chen Gang
2013-01-11 11:38 ` Santosh Shilimkar
2 siblings, 1 reply; 10+ messages in thread
From: Chen Gang @ 2013-01-11 5:39 UTC (permalink / raw)
To: Santosh Shilimkar, tony, linux; +Cc: linux-omap, linux-arm-kernel
'omap_dma_reserve_channels' when used is suppose to be from command.
so, it alreay has value before 1st call of omap_system_dma_probe.
and it will never be changed again during running (not from ioctl).
but 'dma_lch_count' is zero before 1st call of omap_system_dma_probe.
so it will be failed for omap_dma_reserve_channels, when 1st call.
so, need use 'd->lch_count' instead of 'dma_lch_count' for judging.
Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
arch/arm/plat-omap/dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 4136b20..e06c34b 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -2019,7 +2019,7 @@ static int 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_count))
d->lch_count = omap_dma_reserve_channels;
dma_lch_count = d->lch_count;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] arch/arm/plat-omap: initializing dma_lch_count, before judging omap_dma_reserve_channels
2013-01-11 5:03 ` Chen Gang
@ 2013-01-11 7:26 ` Santosh Shilimkar
2013-01-11 11:24 ` Chen Gang
0 siblings, 1 reply; 10+ messages in thread
From: Santosh Shilimkar @ 2013-01-11 7:26 UTC (permalink / raw)
To: Chen Gang; +Cc: tony, linux, linux-omap, linux-arm-kernel
On Friday 11 January 2013 10:33 AM, Chen Gang wrote:
> 于 2013年01月10日 18:48, Santosh Shilimkar 写道:
>> 'omap_dma_reserve_channels' when used is suppose to be from command
>> line. Hence the proposed fix in the review is the right one.
>
> ok, thank you for your suggestion.
>
> I will send patch v2, also mark you as Signed-of-by.
>
Acked-by: is just fine.
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] arch/arm/plat-omap: initializing dma_lch_count, before judging omap_dma_reserve_channels
2013-01-11 7:26 ` Santosh Shilimkar
@ 2013-01-11 11:24 ` Chen Gang
0 siblings, 0 replies; 10+ messages in thread
From: Chen Gang @ 2013-01-11 11:24 UTC (permalink / raw)
To: Santosh Shilimkar; +Cc: tony, linux, linux-omap, linux-arm-kernel
于 2013年01月11日 15:26, Santosh Shilimkar 写道:
> On Friday 11 January 2013 10:33 AM, Chen Gang wrote:
>> �� 2013��01��10�� 18:48, Santosh Shilimkar �:
>>> 'omap_dma_reserve_channels' when used is suppose to be from command
>>> line. Hence the proposed fix in the review is the right one.
>>
>> ok, thank you for your suggestion.
>>
>> I will send patch v2, also mark you as Signed-of-by.
>>
> Acked-by: is just fine.
>
>
>
thanks, I have send patch v2 for it, since it is a new subject, so
still use [PATCH] instead of [PATCH v2].
the subject of the new patch (which has sent) is:
[PATCH] ARM: OMAP: Fix the use of uninitialized dma_lch_count
please check, thanks.
--
Chen Gang
Asianux Corporation
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ARM: OMAP: Fix the use of uninitialized dma_lch_count
2013-01-11 5:39 ` [PATCH] ARM: OMAP: Fix the use of uninitialized dma_lch_count Chen Gang
@ 2013-01-11 11:38 ` Santosh Shilimkar
2013-02-01 22:40 ` Tony Lindgren
0 siblings, 1 reply; 10+ messages in thread
From: Santosh Shilimkar @ 2013-01-11 11:38 UTC (permalink / raw)
To: Chen Gang, tony; +Cc: linux, linux-omap, linux-arm-kernel
On Friday 11 January 2013 11:09 AM, Chen Gang wrote:
>
> 'omap_dma_reserve_channels' when used is suppose to be from command.
> so, it alreay has value before 1st call of omap_system_dma_probe.
> and it will never be changed again during running (not from ioctl).
>
> but 'dma_lch_count' is zero before 1st call of omap_system_dma_probe.
> so it will be failed for omap_dma_reserve_channels, when 1st call.
>
> so, need use 'd->lch_count' instead of 'dma_lch_count' for judging.
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> ---
Looks fine to me.
Tony,
If you are ok with the patch, can you pick this fix in your
non-critical fixes branch ?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ARM: OMAP: Fix the use of uninitialized dma_lch_count
2013-01-11 11:38 ` Santosh Shilimkar
@ 2013-02-01 22:40 ` Tony Lindgren
0 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2013-02-01 22:40 UTC (permalink / raw)
To: Santosh Shilimkar; +Cc: Chen Gang, linux, linux-omap, linux-arm-kernel
* Santosh Shilimkar <santosh.shilimkar@ti.com> [130111 03:40]:
> On Friday 11 January 2013 11:09 AM, Chen Gang wrote:
> >
> > 'omap_dma_reserve_channels' when used is suppose to be from command.
> > so, it alreay has value before 1st call of omap_system_dma_probe.
> > and it will never be changed again during running (not from ioctl).
> >
> > but 'dma_lch_count' is zero before 1st call of omap_system_dma_probe.
> > so it will be failed for omap_dma_reserve_channels, when 1st call.
> >
> > so, need use 'd->lch_count' instead of 'dma_lch_count' for judging.
> >
> >Signed-off-by: Chen Gang <gang.chen@asianux.com>
> >Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> >---
> Looks fine to me.
>
> Tony,
> If you are ok with the patch, can you pick this fix in your
> non-critical fixes branch ?
Yes applying thanks.
Tony
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-02-01 22:40 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-10 10:29 [PATCH] arch/arm/plat-omap: initializing dma_lch_count, before judging omap_dma_reserve_channels Chen Gang
2013-01-10 10:48 ` Santosh Shilimkar
2013-01-10 10:51 ` Santosh Shilimkar
2013-01-11 5:09 ` Chen Gang
2013-01-11 5:03 ` Chen Gang
2013-01-11 7:26 ` Santosh Shilimkar
2013-01-11 11:24 ` Chen Gang
2013-01-11 5:39 ` [PATCH] ARM: OMAP: Fix the use of uninitialized dma_lch_count Chen Gang
2013-01-11 11:38 ` Santosh Shilimkar
2013-02-01 22:40 ` Tony Lindgren
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).