[PATCH 1/2] staging: xillybus: Fix if-else coding style errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



According to Documentation/CodingStyle, when one branch of an if-else
statement has multiple statements, both branches should be enclosed in curly
brackets.

Signed-off-by: Eli Billauer <eli.billauer@xxxxxxxxx>
---
 drivers/staging/xillybus/xillybus_core.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers/staging/xillybus/xillybus_core.c
index 2d59734..0214009 100644
--- a/drivers/staging/xillybus/xillybus_core.c
+++ b/drivers/staging/xillybus/xillybus_core.c
@@ -158,10 +158,10 @@ irqreturn_t xillybus_isr(int irq, void *data)
 				ep->msg_counter,
 				i/2);
 
-			if (++ep->failed_messages > 10)
+			if (++ep->failed_messages > 10) {
 				dev_err(ep->dev,
 					"Lost sync with interrupt messages. Stopping.\n");
-			else {
+			} else {
 				ep->ephw->hw_sync_sgl_for_device(
 					ep,
 					ep->msgbuf_dma_addr,
@@ -532,8 +532,9 @@ static int xilly_setupchannels(struct xilly_endpoint *ep,
 
 			if (!buffers)
 				goto memfail;
-		} else
+		} else {
 			bytebufsize = bufsize << 2;
+		}
 
 		if (!is_writebuf) {
 			channel->num_rd_buffers = bufnum;
-- 
1.7.2.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux