This is really material for the dma-mapping tree (besides the obvious coding style problem). I'll try to unwind through the thread ASAP once I've got more burning issues of my plate and will see it it otherwise makes sense and pick it up in the proper tree if so.