Re: [PATCH v3 4/5] dma: cppi41: only allocate descriptor memory once

2013-10-02 Thread Sebastian Andrzej Siewior
On 10/01/2013 06:57 PM, Daniel Mack wrote: That sound's like a good idea. Everything that make the driver smaller and easier to understand is certainly a good thing :) So we can drop this patch favor of your cleanup. However, I appreciate if you did it on top of the second round of patches I

Re: [PATCH v3 4/5] dma: cppi41: only allocate descriptor memory once

2013-10-01 Thread Daniel Mack
Hi Sebastian, sorry for the long delay, I got distracted by other things. On 26.09.2013 10:26, Sebastian Andrzej Siewior wrote: * Daniel Mack | 2013-09-22 16:50:03 [+0200]: cdd-cd and cdd-descs_phys are allocated DESCS_AREAS times from init_descs() and freed as often from purge_descs().

Re: [PATCH v3 4/5] dma: cppi41: only allocate descriptor memory once

2013-10-01 Thread Sebastian Andrzej Siewior
On 10/01/2013 03:09 PM, Daniel Mack wrote: Hi Sebastian, Hi Daniel, sorry for the long delay, I got distracted by other things. No problem. Well, I didn't merge the descriptors. Look again at my changes please. A simplified version of the code as it stands is: for (i = 0; i

Re: [PATCH v3 4/5] dma: cppi41: only allocate descriptor memory once

2013-10-01 Thread Daniel Mack
On 01.10.2013 18:22, Sebastian Andrzej Siewior wrote: On 10/01/2013 03:09 PM, Daniel Mack wrote: A simplified version of the code as it stands is: for (i = 0; i DESCS_AREAS; i++) cdd-cd = dma_alloc_coherent(dev, ..., cdd-descs_phys, GFP_KERNEL); for (i = 0; i DESCS_AREAS; i++)

Re: [PATCH v3 4/5] dma: cppi41: only allocate descriptor memory once

2013-09-26 Thread Sebastian Andrzej Siewior
* Daniel Mack | 2013-09-22 16:50:03 [+0200]: cdd-cd and cdd-descs_phys are allocated DESCS_AREAS times from init_descs() and freed as often from purge_descs(). This leads to both memory leaks and double-frees. Fix this by pulling the calls to dma_{alloc,free}_coherent() out of the loops. While

Re: [PATCH v3 4/5] dma: cppi41: only allocate descriptor memory once

2013-09-23 Thread Sebastian Andrzej Siewior
On 09/23/2013 06:17 AM, Vinod Koul wrote: Looks fine, Sebastian cna you test it pls Just noticed that you already applied some of them. I just got back after a few weeks of. Will review test as soon as I get to it. ~Vinod Sebastian -- To unsubscribe from this list: send the line

Re: [PATCH v3 4/5] dma: cppi41: only allocate descriptor memory once

2013-09-23 Thread Vinod Koul
On Mon, Sep 23, 2013 at 04:51:06PM +0200, Sebastian Andrzej Siewior wrote: On 09/23/2013 06:17 AM, Vinod Koul wrote: Looks fine, Sebastian cna you test it pls Just noticed that you already applied some of them. I just got back after a few weeks of. Will review test as soon as I get to it.

[PATCH v3 4/5] dma: cppi41: only allocate descriptor memory once

2013-09-22 Thread Daniel Mack
cdd-cd and cdd-descs_phys are allocated DESCS_AREAS times from init_descs() and freed as often from purge_descs(). This leads to both memory leaks and double-frees. Fix this by pulling the calls to dma_{alloc,free}_coherent() out of the loops. While at it, remove the intermediate variable

Re: [PATCH v3 4/5] dma: cppi41: only allocate descriptor memory once

2013-09-22 Thread Vinod Koul
On Sun, Sep 22, 2013 at 04:50:03PM +0200, Daniel Mack wrote: cdd-cd and cdd-descs_phys are allocated DESCS_AREAS times from init_descs() and freed as often from purge_descs(). This leads to both memory leaks and double-frees. Fix this by pulling the calls to dma_{alloc,free}_coherent() out