* [PATCH v2 0/3] minor omap dma fixes
@ 2013-06-13 14:17 Rajendra Nayak
2013-06-13 14:17 ` [PATCH v2 1/3] ARM: OMAP: dma: Remove the wrong dev_id check Rajendra Nayak
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Rajendra Nayak @ 2013-06-13 14:17 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
Here are some minor omap dma fixes.
v2:
Patch 3/3 was wrongly fixed by just changing the
kfree() order. As Russell suggested the kfree()
was that for platform_data and wrong to begin with.
So Patch 3/3 now removes all instances of kfree() of
platform_data.
R Sricharan (2):
ARM: OMAP: dma: Remove the wrong dev_id check
ARM: OMAP: dma: Fix the dma_chan_link_map init order
Rajendra Nayak (1):
ARM: OMAP: dma: Remove the erroneous freeing of platform data
arch/arm/plat-omap/dma.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/3] ARM: OMAP: dma: Remove the wrong dev_id check
2013-06-13 14:17 [PATCH v2 0/3] minor omap dma fixes Rajendra Nayak
@ 2013-06-13 14:17 ` Rajendra Nayak
2013-06-13 14:17 ` [PATCH v2 2/3] ARM: OMAP: dma: Fix the dma_chan_link_map init order Rajendra Nayak
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Rajendra Nayak @ 2013-06-13 14:17 UTC (permalink / raw)
To: linux-arm-kernel
From: R Sricharan <r.sricharan@ti.com>
Once a free channel is found, the check for dev_id == 0 does
not make any sense. Get rid of it.
Signed-off-by: R Sricharan <r.sricharan@ti.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 e06c34b..2f99331 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -701,8 +701,8 @@ int omap_request_dma(int dev_id, const char *dev_name,
for (ch = 0; ch < dma_chan_count; ch++) {
if (free_ch == -1 && dma_chan[ch].dev_id == -1) {
free_ch = ch;
- if (dev_id == 0)
- break;
+ /* Exit after first free channel found */
+ break;
}
}
if (free_ch == -1) {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/3] ARM: OMAP: dma: Fix the dma_chan_link_map init order
2013-06-13 14:17 [PATCH v2 0/3] minor omap dma fixes Rajendra Nayak
2013-06-13 14:17 ` [PATCH v2 1/3] ARM: OMAP: dma: Remove the wrong dev_id check Rajendra Nayak
@ 2013-06-13 14:17 ` Rajendra Nayak
2013-06-13 14:17 ` [PATCH v2 3/3] ARM: OMAP: dma: Remove the erroneous freeing of platform data Rajendra Nayak
2013-06-18 7:10 ` [PATCH v2 0/3] minor omap dma fixes Tony Lindgren
3 siblings, 0 replies; 5+ messages in thread
From: Rajendra Nayak @ 2013-06-13 14:17 UTC (permalink / raw)
To: linux-arm-kernel
From: R Sricharan <r.sricharan@ti.com>
Init dma_chan_link_map[lch] *after* its memset to 0.
Signed-off-by: R Sricharan <r.sricharan@ti.com>
---
arch/arm/plat-omap/dma.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 2f99331..8a71f75 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -894,11 +894,12 @@ void omap_start_dma(int lch)
int next_lch, cur_lch;
char dma_chan_link_map[MAX_LOGICAL_DMA_CH_COUNT];
- dma_chan_link_map[lch] = 1;
/* Set the link register of the first channel */
enable_lnk(lch);
memset(dma_chan_link_map, 0, sizeof(dma_chan_link_map));
+ dma_chan_link_map[lch] = 1;
+
cur_lch = dma_chan[lch].next_lch;
do {
next_lch = dma_chan[cur_lch].next_lch;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 3/3] ARM: OMAP: dma: Remove the erroneous freeing of platform data
2013-06-13 14:17 [PATCH v2 0/3] minor omap dma fixes Rajendra Nayak
2013-06-13 14:17 ` [PATCH v2 1/3] ARM: OMAP: dma: Remove the wrong dev_id check Rajendra Nayak
2013-06-13 14:17 ` [PATCH v2 2/3] ARM: OMAP: dma: Fix the dma_chan_link_map init order Rajendra Nayak
@ 2013-06-13 14:17 ` Rajendra Nayak
2013-06-18 7:10 ` [PATCH v2 0/3] minor omap dma fixes Tony Lindgren
3 siblings, 0 replies; 5+ messages in thread
From: Rajendra Nayak @ 2013-06-13 14:17 UTC (permalink / raw)
To: linux-arm-kernel
Given p = pdev->dev.platform_data; and
d = p->dma_attr;
the freeing of either one of these by the driver
seems just plain wrong.
Get rid of them in the .probe failure path as well as the
.remove.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
---
arch/arm/plat-omap/dma.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 8a71f75..4d463ca 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -2111,8 +2111,6 @@ exit_dma_irq_fail:
}
exit_dma_lch_fail:
- kfree(p);
- kfree(d);
kfree(dma_chan);
return ret;
}
@@ -2133,8 +2131,6 @@ static int omap_system_dma_remove(struct platform_device *pdev)
free_irq(dma_irq, (void *)(irq_rel + 1));
}
}
- kfree(p);
- kfree(d);
kfree(dma_chan);
return 0;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 0/3] minor omap dma fixes
2013-06-13 14:17 [PATCH v2 0/3] minor omap dma fixes Rajendra Nayak
` (2 preceding siblings ...)
2013-06-13 14:17 ` [PATCH v2 3/3] ARM: OMAP: dma: Remove the erroneous freeing of platform data Rajendra Nayak
@ 2013-06-18 7:10 ` Tony Lindgren
3 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2013-06-18 7:10 UTC (permalink / raw)
To: linux-arm-kernel
* Rajendra Nayak <rnayak@ti.com> [130613 07:23]:
> Hi,
>
> Here are some minor omap dma fixes.
>
> v2:
> Patch 3/3 was wrongly fixed by just changing the
> kfree() order. As Russell suggested the kfree()
> was that for platform_data and wrong to begin with.
> So Patch 3/3 now removes all instances of kfree() of
> platform_data.
Thanks applying into omap-for-v3.11/dma.
Regards,
Tony
> R Sricharan (2):
> ARM: OMAP: dma: Remove the wrong dev_id check
> ARM: OMAP: dma: Fix the dma_chan_link_map init order
>
> Rajendra Nayak (1):
> ARM: OMAP: dma: Remove the erroneous freeing of platform data
>
> arch/arm/plat-omap/dma.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> --
> 1.7.9.5
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-06-18 7:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-13 14:17 [PATCH v2 0/3] minor omap dma fixes Rajendra Nayak
2013-06-13 14:17 ` [PATCH v2 1/3] ARM: OMAP: dma: Remove the wrong dev_id check Rajendra Nayak
2013-06-13 14:17 ` [PATCH v2 2/3] ARM: OMAP: dma: Fix the dma_chan_link_map init order Rajendra Nayak
2013-06-13 14:17 ` [PATCH v2 3/3] ARM: OMAP: dma: Remove the erroneous freeing of platform data Rajendra Nayak
2013-06-18 7:10 ` [PATCH v2 0/3] minor omap dma fixes 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).