diff mbox series

serial: sh-sci: Remove BREAK/FRAME/PARITY/OVERRUN printouts

Message ID 163884254093.18109.2982470198301927679.sendpatchset@octo (mailing list archive)
State Accepted
Delegated to: Geert Uytterhoeven
Headers show
Series serial: sh-sci: Remove BREAK/FRAME/PARITY/OVERRUN printouts | expand

Commit Message

Magnus Damm Dec. 7, 2021, 2:02 a.m. UTC
From: Magnus Damm <damm+renesas@opensource.se>

Update the SCIF serial driver to remove printouts for break, frame, parity
and overrun errors. This reduces the amount of console printouts generated
by the defconfig kernel on R-Car Gen3 for certain use cases. To retrieve
more information about such errors the user may inspect counters. Also these
errors are fed into the TTY layer for further application specific handling.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

 Applies to v5.16-rc4

 Previous version sent as:
 [PATCH] serial: sh-sci: Use dev_dbg() for frame and parity errors

 drivers/tty/serial/sh-sci.c |   12 ------------
 1 file changed, 12 deletions(-)

Comments

Geert Uytterhoeven Dec. 7, 2021, 7:52 a.m. UTC | #1
On Tue, Dec 7, 2021 at 3:54 AM Magnus Damm <damm@opensource.se> wrote:
> From: Magnus Damm <damm+renesas@opensource.se>
>
> Update the SCIF serial driver to remove printouts for break, frame, parity
> and overrun errors. This reduces the amount of console printouts generated
> by the defconfig kernel on R-Car Gen3 for certain use cases. To retrieve
> more information about such errors the user may inspect counters. Also these
> errors are fed into the TTY layer for further application specific handling.
>
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Wolfram Sang Dec. 7, 2021, 8:25 a.m. UTC | #2
On Tue, Dec 07, 2021 at 11:02:20AM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm+renesas@opensource.se>
> 
> Update the SCIF serial driver to remove printouts for break, frame, parity
> and overrun errors. This reduces the amount of console printouts generated
> by the defconfig kernel on R-Car Gen3 for certain use cases. To retrieve
> more information about such errors the user may inspect counters. Also these
> errors are fed into the TTY layer for further application specific handling.
> 
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
diff mbox series

Patch

--- 0001/drivers/tty/serial/sh-sci.c
+++ work/drivers/tty/serial/sh-sci.c	2021-12-07 10:37:45.974123374 +0900
@@ -895,11 +895,9 @@  static void sci_receive_chars(struct uar
 				if (status & SCxSR_FER(port)) {
 					flag = TTY_FRAME;
 					port->icount.frame++;
-					dev_notice(port->dev, "frame error\n");
 				} else if (status & SCxSR_PER(port)) {
 					flag = TTY_PARITY;
 					port->icount.parity++;
-					dev_notice(port->dev, "parity error\n");
 				} else
 					flag = TTY_NORMAL;
 
@@ -939,8 +937,6 @@  static int sci_handle_errors(struct uart
 		/* overrun error */
 		if (tty_insert_flip_char(tport, 0, TTY_OVERRUN))
 			copied++;
-
-		dev_notice(port->dev, "overrun error\n");
 	}
 
 	if (status & SCxSR_FER(port)) {
@@ -949,8 +945,6 @@  static int sci_handle_errors(struct uart
 
 		if (tty_insert_flip_char(tport, 0, TTY_FRAME))
 			copied++;
-
-		dev_notice(port->dev, "frame error\n");
 	}
 
 	if (status & SCxSR_PER(port)) {
@@ -959,8 +953,6 @@  static int sci_handle_errors(struct uart
 
 		if (tty_insert_flip_char(tport, 0, TTY_PARITY))
 			copied++;
-
-		dev_notice(port->dev, "parity error\n");
 	}
 
 	if (copied)
@@ -990,8 +982,6 @@  static int sci_handle_fifo_overrun(struc
 
 		tty_insert_flip_char(tport, 0, TTY_OVERRUN);
 		tty_flip_buffer_push(tport);
-
-		dev_dbg(port->dev, "overrun error\n");
 		copied++;
 	}
 
@@ -1013,8 +1003,6 @@  static int sci_handle_breaks(struct uart
 		/* Notify of BREAK */
 		if (tty_insert_flip_char(tport, 0, TTY_BREAK))
 			copied++;
-
-		dev_dbg(port->dev, "BREAK detected\n");
 	}
 
 	if (copied)