list_del(&desc->vdesc.node);
vchan_cookie_complete(&desc->vdesc);
chan_issued = gdma_next_desc(chan);
- } else
+ } else {
chan_issued = 1;
+ }
}
- } else
+ } else {
dev_dbg(dma_dev->ddev.dev, "chan %d no desc to complete\n",
chan->id);
+ }
if (chan_issued)
set_bit(chan->id, &dma_dev->chan_issued);
spin_unlock_irqrestore(&chan->vchan.lock, flags);
if (gdma_next_desc(chan)) {
set_bit(chan->id, &dma_dev->chan_issued);
tasklet_schedule(&dma_dev->task);
- } else
+ } else {
dev_dbg(dma_dev->ddev.dev, "chan %d no desc to issue\n",
chan->id);
+ }
}
spin_unlock_irqrestore(&chan->vchan.lock, flags);
}
desc->residue = 0;
for_each_sg(sgl, sg, sg_len, i) {
- if (direction == DMA_MEM_TO_DEV)
+ if (direction == DMA_MEM_TO_DEV) {
desc->sg[i].src_addr = sg_dma_address(sg);
- else if (direction == DMA_DEV_TO_MEM)
+ } else if (direction == DMA_DEV_TO_MEM) {
desc->sg[i].dst_addr = sg_dma_address(sg);
- else {
+ } else {
dev_err(c->device->dev, "direction type %d error\n",
direction);
goto free_desc;
desc->residue = buf_len;
for (i = 0; i < num_periods; i++) {
- if (direction == DMA_MEM_TO_DEV)
+ if (direction == DMA_MEM_TO_DEV) {
desc->sg[i].src_addr = buf_addr;
- else if (direction == DMA_DEV_TO_MEM)
+ } else if (direction == DMA_DEV_TO_MEM) {
desc->sg[i].dst_addr = buf_addr;
- else {
+ } else {
dev_err(c->device->dev, "direction type %d error\n",
direction);
goto free_desc;
if (chan->desc) {
atomic_inc(&dma_dev->cnt);
gdma_start_transfer(dma_dev, chan);
- } else
+ } else {
dev_dbg(dma_dev->ddev.dev, "chan %d no desc to issue\n", chan->id);
-
+ }
if (!dma_dev->chan_issued)
break;
}