Skip to contentSkip to conversation

staging: pi433: break line after comparison operator to fix checkpatch warning

PATCH RESEND In review Jules Irenge 2 participants 2 messages Mar 23, 2019 – Mar 24, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 staging: pi433: break line after comparison operator to fix checkpatch warning

Break line after comparison operator to solve checkpatch.pl warning:
"WARNING: line over 80 characters".

---
 drivers/staging/pi433/pi433_if.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/staging/pi433/pi433_if.c +6 -3
index b2314636dc89..f537722395c6 100644
@@ -479,7 +479,8 @@ 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);
 		if (retval) /* wait was interrupted */
 			goto abort;
 
@@ -500,7 +501,8 @@ pi433_receive(void *data)
 		bytes_total--;
 
 		retval = wait_event_interruptible(dev->fifo_wait_queue,
-						  dev->free_in_fifo < FIFO_SIZE);
+						  dev->free_in_fifo <
+						  FIFO_SIZE);
 		if (retval) /* wait was interrupted */
 			goto abort;
 
@@ -513,7 +515,8 @@ pi433_receive(void *data)
 	while (dev->rx_position < bytes_total) {
 		if (!rf69_get_flag(dev->spi, payload_ready)) {
 			retval = wait_event_interruptible(dev->fifo_wait_queue,
-							  dev->free_in_fifo < FIFO_SIZE);
+							  dev->free_in_fifo <
+							  FIFO_SIZE);
 			if (retval) /* wait was interrupted */
 				goto abort;
 		}
Signature · 1 line
2.20.1
#1 lore raw
Quoted 2 lines · Jules Irenge

Break line after comparison operator to solve checkpatch.pl warning:
"WARNING: line over 80 characters".

Don't add a newline in the middle of an expression.

It is only the semicolon that goes over. I don't think it harms readability very much.

julia

Quoted 50 lines
---
 drivers/staging/pi433/pi433_if.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/staging/pi433/pi433_if.c +6 -4
index b2314636dc89..f537722395c6 100644
@@ -479,7 +479,8 @@ 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);
 		if (retval) /* wait was interrupted */
 			goto abort;
 
@@ -500,7 +501,8 @@ pi433_receive(void *data)
 		bytes_total--;
 
 		retval = wait_event_interruptible(dev->fifo_wait_queue,
-						  dev->free_in_fifo < FIFO_SIZE);
+						  dev->free_in_fifo <
+						  FIFO_SIZE);
 		if (retval) /* wait was interrupted */
 			goto abort;
 
@@ -513,7 +515,8 @@ pi433_receive(void *data)
 	while (dev->rx_position < bytes_total) {
 		if (!rf69_get_flag(dev->spi, payload_ready)) {
 			retval = wait_event_interruptible(dev->fifo_wait_queue,
-							  dev->free_in_fifo < FIFO_SIZE);
+							  dev->free_in_fifo <
+							  FIFO_SIZE);
 			if (retval) /* wait was interrupted */
 				goto abort;
 		}
--

2.20.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190323002555.5280-1-jbi.octave%40gmail.com.
For more options, visit https://groups.google.com/d/optout.