Skip to contentSkip to conversation

staging: pi433: cleanup to adhere with linux coding style

PATCH Greg Kroah-Hartman 1 participant 1 message May 23, 2019 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20190523010619.GA23217@t-1000

#1 lore raw
Quoted 19 lines · Shobhit Kukreti

The linux coding style emphasizes on a limit of 80 characters per line. Cleaned up several over 80 character warnings in following files:

pi433_if.c
pi433_if.h
rf69.c

---
 drivers/staging/pi433/pi433_if.c | 15 ++++---
 drivers/staging/pi433/pi433_if.h | 25 +++++++----
 drivers/staging/pi433/rf69.c     | 89 ++++++++++++++++++++++++----------------
 3 files changed, 78 insertions(+), 51 deletions(-)
drivers/staging/pi433/pi433_if.c +0 -0
index c889f0b..07715c9 100644

drivers/staging/pi433/pi433_if.c pi433_receive(void *data) · line 442

Quoted 6 lines
drivers/staging/pi433/pi433_if.c +1 -2
@@ -439,8 +439,7 @@ pi433_receive(void *data)
 		/* wait for RSSI level to become high */
 		dev_dbg(dev->dev, "rx: going to wait for high RSSI level");
 		retval = wait_event_interruptible(dev->rx_wait_queue,
-						  rf69_get_flag(dev->spi,
-								rssi_exceeded_threshold));
+			rf69_get_flag(dev->spi,	rssi_exceeded_threshold));

Ick, no. The original code is fine here, this makes it much harder to understand what is going on here, right?

drivers/staging/pi433/pi433_if.c pi433_receive(void *data) · line 477

Quoted 9 lines
drivers/staging/pi433/pi433_if.c +1 -1
 		if (retval) /* wait was interrupted */
 			goto abort;
 		dev->interrupt_rx_allowed = false;
@@ -475,7 +474,7 @@ pi433_receive(void *data)
 	/* length byte enabled? */
 	if (dev->rx_cfg.enable_length_byte == OPTION_ON) {
 		retval = wait_event_interruptible(dev->fifo_wait_queue,
-						  dev->free_in_fifo < FIFO_SIZE);
+					dev->free_in_fifo < FIFO_SIZE);

Same for this, and all the other changes you made. The 80 column "rule" is just a strong hint. There are other ways to remove it instead of just moving code to the left like you did here, if you really want to fix these warnings up.

thanks,

greg k-h