Commit 4765f683 authored by Lou Knauer's avatar Lou Knauer Committed by Greg Kroah-Hartman

staging: mt7621-dma: fix unbalanced braces

Add braces to conditional statements if the other branch has them in
order to be more compliant with the linux kernel coding style.

Remaining checkpatch.pl issues include unnecessary line continuations
and use of non-conventional types.
Signed-off-by: default avatarLou Knauer <lou.knauer@fau.de>
Signed-off-by: default avatarPhilipp Panzer <philipp.panzer@fau.de>
Reviewed-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3dbf37c0
...@@ -459,12 +459,14 @@ static void gdma_dma_chan_irq(struct gdma_dma_dev *dma_dev, ...@@ -459,12 +459,14 @@ static void gdma_dma_chan_irq(struct gdma_dma_dev *dma_dev,
list_del(&desc->vdesc.node); list_del(&desc->vdesc.node);
vchan_cookie_complete(&desc->vdesc); vchan_cookie_complete(&desc->vdesc);
chan_issued = gdma_next_desc(chan); chan_issued = gdma_next_desc(chan);
} else } else {
chan_issued = 1; chan_issued = 1;
} }
} else }
} else {
dev_dbg(dma_dev->ddev.dev, "chan %d no desc to complete\n", dev_dbg(dma_dev->ddev.dev, "chan %d no desc to complete\n",
chan->id); chan->id);
}
if (chan_issued) if (chan_issued)
set_bit(chan->id, &dma_dev->chan_issued); set_bit(chan->id, &dma_dev->chan_issued);
spin_unlock_irqrestore(&chan->vchan.lock, flags); spin_unlock_irqrestore(&chan->vchan.lock, flags);
...@@ -512,10 +514,11 @@ static void gdma_dma_issue_pending(struct dma_chan *c) ...@@ -512,10 +514,11 @@ static void gdma_dma_issue_pending(struct dma_chan *c)
if (gdma_next_desc(chan)) { if (gdma_next_desc(chan)) {
set_bit(chan->id, &dma_dev->chan_issued); set_bit(chan->id, &dma_dev->chan_issued);
tasklet_schedule(&dma_dev->task); tasklet_schedule(&dma_dev->task);
} else } else {
dev_dbg(dma_dev->ddev.dev, "chan %d no desc to issue\n", dev_dbg(dma_dev->ddev.dev, "chan %d no desc to issue\n",
chan->id); chan->id);
} }
}
spin_unlock_irqrestore(&chan->vchan.lock, flags); spin_unlock_irqrestore(&chan->vchan.lock, flags);
} }
...@@ -537,11 +540,11 @@ static struct dma_async_tx_descriptor *gdma_dma_prep_slave_sg( ...@@ -537,11 +540,11 @@ static struct dma_async_tx_descriptor *gdma_dma_prep_slave_sg(
desc->residue = 0; desc->residue = 0;
for_each_sg(sgl, sg, sg_len, i) { 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); 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); desc->sg[i].dst_addr = sg_dma_address(sg);
else { } else {
dev_err(c->device->dev, "direction type %d error\n", dev_err(c->device->dev, "direction type %d error\n",
direction); direction);
goto free_desc; goto free_desc;
...@@ -637,11 +640,11 @@ static struct dma_async_tx_descriptor *gdma_dma_prep_dma_cyclic( ...@@ -637,11 +640,11 @@ static struct dma_async_tx_descriptor *gdma_dma_prep_dma_cyclic(
desc->residue = buf_len; desc->residue = buf_len;
for (i = 0; i < num_periods; i++) { 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; 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; desc->sg[i].dst_addr = buf_addr;
else { } else {
dev_err(c->device->dev, "direction type %d error\n", dev_err(c->device->dev, "direction type %d error\n",
direction); direction);
goto free_desc; goto free_desc;
...@@ -737,9 +740,9 @@ static void gdma_dma_tasklet(unsigned long arg) ...@@ -737,9 +740,9 @@ static void gdma_dma_tasklet(unsigned long arg)
if (chan->desc) { if (chan->desc) {
atomic_inc(&dma_dev->cnt); atomic_inc(&dma_dev->cnt);
gdma_start_transfer(dma_dev, chan); gdma_start_transfer(dma_dev, chan);
} else } else {
dev_dbg(dma_dev->ddev.dev, "chan %d no desc to issue\n", chan->id); dev_dbg(dma_dev->ddev.dev, "chan %d no desc to issue\n", chan->id);
}
if (!dma_dev->chan_issued) if (!dma_dev->chan_issued)
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment