On Wed, Apr 06, 2016 at 08:34:51PM +0800, Keguang Zhang wrote: > @@ -527,6 +527,15 @@ config ZX_DMA > help > Support the DMA engine for ZTE ZX296702 platform devices. > > +config DMA_LOONGSON1 The kconfig and makefile is sorted alphabetically, pls arrage these entries accordingly > + > + /*memorize the physical address of descriptor */ bad comment style > + /*allocate DMA descriptors */ here and other places too :( > +static enum dma_status ls1x_dma_tx_status(struct dma_chan *chan, > + dma_cookie_t cookie, > + struct dma_tx_state *txstate) > +{ > + struct ls1x_dma_chan *dma_chan = to_ls1x_dma_chan(chan); > + struct ls1x_dma_desc *dma_desc = dma_chan->dma_desc; > + struct virt_dma_desc *vdesc; > + enum dma_status status; > + unsigned int residue = 0; > + unsigned long flags; > + > + status = dma_cookie_status(chan, cookie, txstate); > + if ((status == DMA_COMPLETE) || !txstate) > + return status; > + > + spin_lock_irqsave(&dma_chan->vchan.lock, flags); > + > + vdesc = vchan_find_desc(&dma_chan->vchan, cookie); > + if (vdesc) > + /* not yet processed */ > + residue = ls1x_dma_desc_residue(to_ls1x_dma_desc(vdesc), 0); If your usage queries reside repeatedly, then it might make sense to store the size which is residue here -- ~Vinod -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html