tech-kern archive

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

Re: proposal for bus_dma(9) change



On Wednesday 04 March 2009 12:01:59 Izumi Tsutsui wrote:
> Christoph_Egger%gmx.de@localhost wrote:
> > If I am correct and if we are not going to change the bus_dma(9)
> > API, then we will always have to fix this only one problem
> > in the drivers again and again.
>
> - Is there any benefit to change all bus_dma(9) implementation
>   instead of all drivers?  I'm afraid the former is more complicated
>   because there are many hidden indirect calls via function pointers
>   in bus_dma structures/macro among machine/bus dependent implementation.

It shouldn't be hard to change bus_dmamap_create() implementation
to return a NULL dmamap pointer in error case.

> - Most (all?) bus_dmamap_destroy() implementation leaves dmamap pointer
>   and you can't use NULL check to see if the dmamap is valid in that case.
>   What do you think about it?

bus_dmamap_destroy() is not the problem. It is bus_dmamap_create() doing
this and the drivers *do* a NULL check if the dmamap is valid.

Christoph


Home | Main Index | Thread Index | Old Index