Commit c14cc622 authored by Eli Billauer's avatar Eli Billauer Committed by Greg Kroah-Hartman

staging: xillybus: Added curly brackets as required

Suggested-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarEli Billauer <eli.billauer@gmail.com>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1af1ea6b
...@@ -141,7 +141,7 @@ irqreturn_t xillybus_isr(int irq, void *data) ...@@ -141,7 +141,7 @@ irqreturn_t xillybus_isr(int irq, void *data)
ep->msg_buf_size, ep->msg_buf_size,
DMA_FROM_DEVICE); DMA_FROM_DEVICE);
for (i = 0; i < buf_size; i += 2) for (i = 0; i < buf_size; i += 2) {
if (((buf[i+1] >> 28) & 0xf) != ep->msg_counter) { if (((buf[i+1] >> 28) & 0xf) != ep->msg_counter) {
malformed_message(ep, &buf[i]); malformed_message(ep, &buf[i]);
dev_warn(ep->dev, dev_warn(ep->dev,
...@@ -166,6 +166,7 @@ irqreturn_t xillybus_isr(int irq, void *data) ...@@ -166,6 +166,7 @@ irqreturn_t xillybus_isr(int irq, void *data)
return IRQ_HANDLED; return IRQ_HANDLED;
} else if (buf[i] & (1 << 22)) /* Last message */ } else if (buf[i] & (1 << 22)) /* Last message */
break; break;
}
if (i >= buf_size) { if (i >= buf_size) {
dev_err(ep->dev, "Bad interrupt message. Stopping.\n"); dev_err(ep->dev, "Bad interrupt message. Stopping.\n");
...@@ -1093,10 +1094,11 @@ static int xillybus_myflush(struct xilly_channel *channel, long timeout) ...@@ -1093,10 +1094,11 @@ static int xillybus_myflush(struct xilly_channel *channel, long timeout)
channel->endpoint->registers + fpga_buf_ctrl_reg); channel->endpoint->registers + fpga_buf_ctrl_reg);
mutex_unlock(&channel->endpoint->register_mutex); mutex_unlock(&channel->endpoint->register_mutex);
} else if (bufidx == 0) } else if (bufidx == 0) {
bufidx = channel->num_rd_buffers - 1; bufidx = channel->num_rd_buffers - 1;
else } else {
bufidx--; bufidx--;
}
channel->rd_host_buf_pos = new_rd_host_buf_pos; channel->rd_host_buf_pos = new_rd_host_buf_pos;
......
...@@ -199,9 +199,9 @@ static int xilly_probe(struct pci_dev *pdev, ...@@ -199,9 +199,9 @@ static int xilly_probe(struct pci_dev *pdev,
* nobody and use 32 bits DMA addressing in any case. * nobody and use 32 bits DMA addressing in any case.
*/ */
if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
endpoint->dma_using_dac = 0; endpoint->dma_using_dac = 0;
else { } else {
dev_err(endpoint->dev, "Failed to set DMA mask. Aborting.\n"); dev_err(endpoint->dev, "Failed to set DMA mask. Aborting.\n");
return -ENODEV; return -ENODEV;
} }
......
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