Skip to contentSkip to conversation

tty: serial: jsm: Fixed file by added more spacing in line 612

PATCH In review Clement Smith 2 participants 9 messages Dec 5, 2020 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/8 tty: serial: jsm: Fixed file by added more spacing in line 610

Fixed a coding style issue

---
 drivers/tty/serial/jsm/jsm_tty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/jsm/jsm_tty.c +1 -1
index 689774c073ca..512b77195e9f 100644
@@ -607,7 +607,7 @@ void jsm_input(struct jsm_channel *ch)
 				 * Give the Linux ld the flags in the
 				 * format it likes.
 				 */
-				if (*(ch->ch_equeue +tail +i) & UART_LSR_BI)
+				if (*(ch->ch_equeue + tail + i) & UART_LSR_BI)
 					tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i),  TTY_BREAK);
 				else if (*(ch->ch_equeue +tail +i) & UART_LSR_PE)
 					tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_PARITY);
Signature · 1 line
2.27.0
maintainer
#2 lore raw

Re: [PATCH 1/8] tty: serial: jsm: Fixed file by added more spacing in line 610

Quoted 6 lines · Clement Smith

Fixed a coding style issue

---
 drivers/tty/serial/jsm/jsm_tty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

The subject lines in this series is really funny.

Please don't do this. If you want to get practice in making coding style cleanups, do it in drivers/staging/ which is why the code is there. Don't "practice" in other parts of the kernel as it just gets in the way of other development and review efforts.

good luck!

greg k-h

#3 lore raw

PATCH 2/8 tty: serial: jsm: Fixed file by added more spacing in line 611

In reply to a message not in the archive

Fixed a coding style issue

---
 drivers/tty/serial/jsm/jsm_tty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/jsm/jsm_tty.c +1 -1
index 512b77195e9f..202d6ba93313 100644
@@ -608,7 +608,7 @@ void jsm_input(struct jsm_channel *ch)
 				 * format it likes.
 				 */
 				if (*(ch->ch_equeue + tail + i) & UART_LSR_BI)
-					tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i),  TTY_BREAK);
+					tty_insert_flip_char(port, *(ch->ch_rqueue + tail + i),  TTY_BREAK);
 				else if (*(ch->ch_equeue +tail +i) & UART_LSR_PE)
 					tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_PARITY);
 				else if (*(ch->ch_equeue +tail +i) & UART_LSR_FE)
Signature · 1 line
2.27.0
#4 lore raw

PATCH 3/8 tty: serial: jsm: Fixed file by added more spacing in line 612

In reply to a message not in the archive

Fixed a coding style issue

---
 drivers/tty/serial/jsm/jsm_tty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/jsm/jsm_tty.c +1 -1
index 202d6ba93313..2bc5f32e59f4 100644
@@ -609,7 +609,7 @@ void jsm_input(struct jsm_channel *ch)
 				 */
 				if (*(ch->ch_equeue + tail + i) & UART_LSR_BI)
 					tty_insert_flip_char(port, *(ch->ch_rqueue + tail + i),  TTY_BREAK);
-				else if (*(ch->ch_equeue +tail +i) & UART_LSR_PE)
+				else if (*(ch->ch_equeue + tail + i) & UART_LSR_PE)
 					tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_PARITY);
 				else if (*(ch->ch_equeue +tail +i) & UART_LSR_FE)
 					tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_FRAME);
Signature · 1 line
2.27.0
#5 lore raw

PATCH 4/8 tty: serial: jsm: Fixed file by added more spacing in line 613

In reply to a message not in the archive

Fixed a coding style issue

---
 drivers/tty/serial/jsm/jsm_tty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/jsm/jsm_tty.c +1 -1
index 2bc5f32e59f4..45e212be64c4 100644
@@ -610,7 +610,7 @@ void jsm_input(struct jsm_channel *ch)
 				if (*(ch->ch_equeue + tail + i) & UART_LSR_BI)
 					tty_insert_flip_char(port, *(ch->ch_rqueue + tail + i),  TTY_BREAK);
 				else if (*(ch->ch_equeue + tail + i) & UART_LSR_PE)
-					tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_PARITY);
+					tty_insert_flip_char(port, *(ch->ch_rqueue + tail + i), TTY_PARITY);
 				else if (*(ch->ch_equeue +tail +i) & UART_LSR_FE)
 					tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_FRAME);
 				else
Signature · 1 line
2.27.0
#6 lore raw

PATCH 5/8 tty: serial: jsm: Fixed file by added more spacing in line 614

In reply to a message not in the archive

Fixed a coding style issue

---
 drivers/tty/serial/jsm/jsm_tty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/jsm/jsm_tty.c +1 -1
index 45e212be64c4..75c9bfa5077c 100644
@@ -611,7 +611,7 @@ void jsm_input(struct jsm_channel *ch)
 					tty_insert_flip_char(port, *(ch->ch_rqueue + tail + i),  TTY_BREAK);
 				else if (*(ch->ch_equeue + tail + i) & UART_LSR_PE)
 					tty_insert_flip_char(port, *(ch->ch_rqueue + tail + i), TTY_PARITY);
-				else if (*(ch->ch_equeue +tail +i) & UART_LSR_FE)
+				else if (*(ch->ch_equeue + tail + i) & UART_LSR_FE)
 					tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_FRAME);
 				else
 					tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_NORMAL);
Signature · 1 line
2.27.0
#7 lore raw

PATCH 6/8 tty: serial: jsm: Fixed file by added more spacing in line 615

In reply to a message not in the archive

Fixed a coding style issue

---
 drivers/tty/serial/jsm/jsm_tty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/jsm/jsm_tty.c +1 -1
index 75c9bfa5077c..19d2f0bc6c10 100644
@@ -612,7 +612,7 @@ void jsm_input(struct jsm_channel *ch)
 				else if (*(ch->ch_equeue + tail + i) & UART_LSR_PE)
 					tty_insert_flip_char(port, *(ch->ch_rqueue + tail + i), TTY_PARITY);
 				else if (*(ch->ch_equeue + tail + i) & UART_LSR_FE)
-					tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_FRAME);
+					tty_insert_flip_char(port, *(ch->ch_rqueue + tail + i), TTY_FRAME);
 				else
 					tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_NORMAL);
 			}
Signature · 1 line
2.27.0
#8 lore raw

PATCH 7/8 tty: serial: jsm: Fixed file by added more spacing in line 616

In reply to a message not in the archive

Fixed a coding style issue

---
 drivers/tty/serial/jsm/jsm_tty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/jsm/jsm_tty.c +1 -1
index 19d2f0bc6c10..eab82fb6b384 100644
@@ -614,7 +614,7 @@ void jsm_input(struct jsm_channel *ch)
 				else if (*(ch->ch_equeue + tail + i) & UART_LSR_FE)
 					tty_insert_flip_char(port, *(ch->ch_rqueue + tail + i), TTY_FRAME);
 				else
-					tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_NORMAL);
+					tty_insert_flip_char(port, *(ch->ch_rqueue + tail + i), TTY_NORMAL);
 			}
 		} else {
 			tty_insert_flip_string(port, ch->ch_rqueue + tail, s);
Signature · 1 line
2.27.0
#9 lore raw

PATCH 8/8 tty: serial: jsm: Removed assignment in if statement

In reply to a message not in the archive

Fixed a coding style issue

---
 drivers/tty/serial/jsm/jsm_tty.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/tty/serial/jsm/jsm_tty.c +2 -1
index eab82fb6b384..bfd4b55e6c74 100644
@@ -742,7 +742,8 @@ void jsm_check_queue_flow_control(struct jsm_channel *ch)
 	int qleft;
 
 	/* Store how much space we have left in the queue */
-	if ((qleft = ch->ch_r_tail - ch->ch_r_head - 1) < 0)
+    qleft = ch->ch_r_tail - ch->ch_r_head - 1;
+	if (qleft < 0)
 		qleft += RQUEUEMASK + 1;
 
 	/*
Signature · 1 line
2.27.0