From c14cc622da94b9e0c9ddeea1bd51e7ff9b02cc04 Mon Sep 17 00:00:00 2001 From: Eli Billauer Date: Thu, 4 Sep 2014 17:47:51 +0300 Subject: [PATCH] staging: xillybus: Added curly brackets as required Suggested-by: Dan Carpenter Signed-off-by: Eli Billauer Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/xillybus/xillybus_core.c | 8 +++++--- drivers/staging/xillybus/xillybus_pcie.c | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers/staging/xillybus/xillybus_core.c index 1b63197..0001d18 100644 --- a/drivers/staging/xillybus/xillybus_core.c +++ b/drivers/staging/xillybus/xillybus_core.c @@ -141,7 +141,7 @@ irqreturn_t xillybus_isr(int irq, void *data) ep->msg_buf_size, 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) { malformed_message(ep, &buf[i]); dev_warn(ep->dev, @@ -166,6 +166,7 @@ irqreturn_t xillybus_isr(int irq, void *data) return IRQ_HANDLED; } else if (buf[i] & (1 << 22)) /* Last message */ break; + } if (i >= buf_size) { dev_err(ep->dev, "Bad interrupt message. Stopping.\n"); @@ -1093,10 +1094,11 @@ static int xillybus_myflush(struct xilly_channel *channel, long timeout) channel->endpoint->registers + fpga_buf_ctrl_reg); mutex_unlock(&channel->endpoint->register_mutex); - } else if (bufidx == 0) + } else if (bufidx == 0) { bufidx = channel->num_rd_buffers - 1; - else + } else { bufidx--; + } channel->rd_host_buf_pos = new_rd_host_buf_pos; diff --git a/drivers/staging/xillybus/xillybus_pcie.c b/drivers/staging/xillybus/xillybus_pcie.c index 371cec3..ec9b923 100644 --- a/drivers/staging/xillybus/xillybus_pcie.c +++ b/drivers/staging/xillybus/xillybus_pcie.c @@ -199,9 +199,9 @@ static int xilly_probe(struct pci_dev *pdev, * 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; - else { + } else { dev_err(endpoint->dev, "Failed to set DMA mask. Aborting.\n"); return -ENODEV; } -- 2.7.4