lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1597853773c53a166a657ff006cb1e4cc8d4d792.1510790802.git.chasemetzger15@gmail.com>
Date:   Wed, 15 Nov 2017 16:35:50 -0800
From:   Chase Metzger <chasemetzger15@...il.com>
To:     gregkh@...uxfoundation.org
Cc:     Chase Metzger <chasemetzger15@...il.com>,
        Marcus Wolf <linux@...f-Entwicklungen.de>,
        Joseph Wright <rjosephwright@...il.com>,
        Arnd Bergmann <arnd@...db.de>,
        Al Viro <viro@...iv.linux.org.uk>,
        Xiangyang Zhang <xyz.sun.ok@...il.com>,
        Srishti Sharma <srishtishar@...il.com>,
        Derek Robson <robsonde@...il.com>, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH 3/6] staging: pi433: pi433_if.c: fix trailing statement coding style issues

Put trailing statement after if/else statements on new line to comply
with the kernel coding style.

Signed-off-by: Chase Metzger <chasemetzger15@...il.com>
---
 drivers/staging/pi433/pi433_if.c | 44 +++++++++++++++++++++++++++-------------
 1 file changed, 30 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index cd1430a04928..3c5d8a05e976 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -156,8 +156,10 @@ static irqreturn_t DIO1_irq_handler(int irq, void *dev_id)
 	if      (device->irq_state[DIO1] == DIO_FifoNotEmpty_DIO1) {
 		device->free_in_fifo = FIFO_SIZE;
 	} else if (device->irq_state[DIO1] == DIO_FifoLevel) {
-		if (device->rx_active)	device->free_in_fifo = FIFO_THRESHOLD - 1;
-		else			device->free_in_fifo = FIFO_SIZE - FIFO_THRESHOLD - 1;
+		if (device->rx_active)
+			device->free_in_fifo = FIFO_THRESHOLD - 1;
+		else
+			device->free_in_fifo = FIFO_SIZE - FIFO_THRESHOLD - 1;
 	}
 	dev_dbg(device->dev,
 		"DIO1 irq: %d bytes free in fifo\n", device->free_in_fifo);
@@ -213,8 +215,10 @@ rf69_set_rx_cfg(struct pi433_device *dev, struct pi433_rx_cfg *rx_cfg)
 		SET_CHECKED(rf69_set_payload_length(dev->spi, 0xff));
 	} else if (rx_cfg->fixed_message_length != 0) {
 		payload_length = rx_cfg->fixed_message_length;
-		if (rx_cfg->enable_length_byte  == optionOn) payload_length++;
-		if (rx_cfg->enable_address_filtering != filteringOff) payload_length++;
+		if (rx_cfg->enable_length_byte  == optionOn)
+			payload_length++;
+		if (rx_cfg->enable_address_filtering != filteringOff)
+			payload_length++;
 		SET_CHECKED(rf69_set_payload_length(dev->spi, payload_length));
 	} else {
 		SET_CHECKED(rf69_set_payload_length(dev->spi, 0));
@@ -285,7 +289,8 @@ pi433_start_rx(struct pi433_device *dev)
 
 	/* setup for receiving */
 	retval = rf69_set_rx_cfg(dev, &dev->rx_cfg);
-	if (retval) return retval;
+	if (retval)
+		return retval;
 
 	/* setup rssi irq */
 	SET_CHECKED(rf69_set_dio_mapping(dev->spi, DIO0, DIO_Rssi_DIO0));
@@ -347,11 +352,13 @@ pi433_receive(void *data)
 		retval = wait_event_interruptible(dev->rx_wait_queue,
 			                          rf69_get_flag(dev->spi,
 		                                                rssiExceededThreshold));
-		if (retval) goto abort; /* wait was interrupted */
+		if (retval) /* wait was interrupted */
+			goto abort;
 		dev->interrupt_rx_allowed = false;
 
 		/* cross check for ongoing tx */
-		if (!dev->tx_active) break;
+		if (!dev->tx_active)
+			break;
 	}
 
 	/* configure payload ready irq */
@@ -376,7 +383,8 @@ pi433_receive(void *data)
 	if (dev->rx_cfg.enable_length_byte == optionOn) {
 		retval = wait_event_interruptible(dev->fifo_wait_queue,
 						  dev->free_in_fifo < FIFO_SIZE);
-		if (retval) goto abort; /* wait was interrupted */
+		if (retval) /* wait was interrupted */
+			goto abort;
 
 		rf69_read_fifo(spi, (u8 *)&bytes_total, 1);
 		if (bytes_total > dev->rx_buffer_size) {
@@ -395,7 +403,8 @@ pi433_receive(void *data)
 
 		retval = wait_event_interruptible(dev->fifo_wait_queue,
 						  dev->free_in_fifo < FIFO_SIZE);
-		if (retval) goto abort; /* wait was interrupted */
+		if (retval) /* wait was interrupted */
+			goto abort;
 
 		rf69_read_fifo(spi, &dummy, 1);
 		dev->free_in_fifo++;
@@ -407,7 +416,8 @@ pi433_receive(void *data)
 		if ( !rf69_get_flag(dev->spi, payloadReady) ) {
 			retval = wait_event_interruptible(dev->fifo_wait_queue,
 							  dev->free_in_fifo < FIFO_SIZE);
-			if (retval) goto abort; /* wait was interrupted */
+			if (retval) /* wait was interrupted */
+				goto abort;
 		}
 
 		/* need to drop bytes or acquire? */
@@ -423,7 +433,8 @@ pi433_receive(void *data)
 		retval = rf69_read_fifo(spi,
 					&dev->rx_buffer[dev->rx_position],
 					bytes_to_read);
-		if (retval) goto abort; /* read failed */
+		if (retval) /* read failed */
+			goto abort;
 		dev->free_in_fifo += bytes_to_read;
 
 		/* adjust status vars */
@@ -592,7 +603,10 @@ pi433_tx_thread(void *data)
 
 			retval = wait_event_interruptible(device->fifo_wait_queue,
 							  device->free_in_fifo > 0);
-			if (retval) { printk("ABORT\n"); goto abort; }
+			if (retval) {
+				printk("ABORT\n");
+				goto abort;
+			}
 		}
 
 		/* we are done. Wait for packet to get sent */
@@ -600,7 +614,8 @@ pi433_tx_thread(void *data)
 		wait_event_interruptible(device->fifo_wait_queue,
 					 device->free_in_fifo == FIFO_SIZE ||
 					 kthread_should_stop() );
-		if ( kthread_should_stop() )	printk("ABORT\n");
+		if ( kthread_should_stop() )
+			printk("ABORT\n");
 
 
 		/* STOP_TRANSMISSION */
@@ -894,7 +909,8 @@ static int setup_GPIOs(struct pi433_device *device)
 		/* configure the pin */
 		gpiod_unexport(device->gpiod[i]);
 		retval = gpiod_direction_input(device->gpiod[i]);
-		if (retval) return retval;
+		if (retval)
+			return retval;
 
 
 		/* configure irq */
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ