Skip to contentSkip to conversation

staging: pi433: line over 80 warnings cleanups

PATCH In review Jules Irenge 3 participants 5 messages Mar 21, 2019 – Mar 22, 2019 Staging

lore
Share & tools
lore
#0 lore raw

v2 cover staging: pi433: line over 80 warnings cleanups

This v2 series improves on the naming of the patches

Jules Irenge (2):
staging: pi433: break line after comparison operator to fix checkpatch
warning
staging: pi433: remove empty space to fix line over 80 characters
warning

 drivers/staging/pi433/pi433_if.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 1/2 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
#2 lore raw

Re: [Outreachy kernel] [PATCH v2 1/2] staging: pi433: break line after comparison operator to fix checkpatch warning

Quoted 13 lines · Jules Irenge

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 +0 -0
index b2314636dc89..f537722395c6 100644

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

Quoted 4 lines
drivers/staging/pi433/pi433_if.c +0 -1
@@ -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);

Even if checkpatch would complain for another reason, it could look nucer with just one tab less in front of the argument. Then the whole argument expression could be kept on one line.

julia

Quoted 35 lines
drivers/staging/pi433/pi433_if.c +6 -3
+						  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/20190321195408.30440-2-jbi.octave%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#3 lore raw

PATCH v2 2/2 staging: pi433: remove empty space to fix line over 80 characters warning

In reply to Jules Irenge

Remove empty space to solve checkpatch.pl warning:
"WARNING: line over 80 characters".

---
 drivers/staging/pi433/pi433_if.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/pi433/pi433_if.c +4 -4
index f537722395c6..76511d01e41f 100644
@@ -45,10 +45,10 @@
 #include "pi433_if.h"
 #include "rf69.h"
 
-#define N_PI433_MINORS			BIT(MINORBITS) /*32*/	/* ... up to 256 */
-#define MAX_MSG_SIZE			900	/* min: FIFO_SIZE! */
-#define MSG_FIFO_SIZE			65536   /* 65536 = 2^16  */
-#define NUM_DIO				2
+#define N_PI433_MINORS		BIT(MINORBITS) /*32*/	/* ... up to 256 */
+#define MAX_MSG_SIZE		900	/* min: FIFO_SIZE! */
+#define MSG_FIFO_SIZE		65536   /* 65536 = 2^16  */
+#define NUM_DIO			2
 
 static dev_t pi433_dev;
 static DEFINE_IDR(pi433_idr);
Signature · 1 line
2.20.1
maintainer
#4 lore raw
In reply to Jules Irenge
Quoted 10 lines · Jules Irenge

This v2 series improves on the naming of the patches

Jules Irenge (2):
staging: pi433: break line after comparison operator to fix checkpatch
warning
staging: pi433: remove empty space to fix line over 80 characters
warning

 drivers/staging/pi433/pi433_if.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

Please make your patches "threaded" so they are all linked together. 'git send-email' will do this automatically for you, I recommend using that.

thanks,

greg k-h