Re: [PATCH RESEND v2] dma: cppi41: only allocate descriptor memory once

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Daniel Mack | 2013-12-04 18:22:24 [+0100]:

>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 mem_decs (I guess it was
>only there to make the code comply to the 80-chars CodingSytle rule).
>
>Signed-off-by: Daniel Mack <zonque@xxxxxxxxx>
We talked about this. I prefer to remove the loop and DESCS_AREAS
instead of putting build bug on != 1. If someone decides to use 2 (what
I doubt) I will still want to call dma_alloc_coherent twice for to small
regions (instead one huge).

I will provide a patch some time for this unless you decide to do so…

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux