diff mbox series

serial: sh-sci: Use dev_dbg() for frame and parity errors

Message ID 163862557847.23421.1243156045279776895.sendpatchset@octo (mailing list archive)
State Changes Requested
Delegated to: Geert Uytterhoeven
Headers show
Series serial: sh-sci: Use dev_dbg() for frame and parity errors | expand

Commit Message

Magnus Damm Dec. 4, 2021, 1:46 p.m. UTC
From: Magnus Damm <damm+renesas@opensource.se>

Adjust the console printout handling for frame and parity errors to the same
style as for break errors by using dev_dbg() instead of dev_notice().
This reduces the amount of console printouts generated by the defconfig kernel
on ARM R-Car Gen3 for certain use cases.

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

 drivers/tty/serial/sh-sci.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Wolfram Sang Dec. 4, 2021, 3:30 p.m. UTC | #1
Hi Magnus,

On Sat, Dec 04, 2021 at 10:46:18PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm+renesas@opensource.se>
> 
> Adjust the console printout handling for frame and parity errors to the same
> style as for break errors by using dev_dbg() instead of dev_notice().
> This reduces the amount of console printouts generated by the defconfig kernel
> on ARM R-Car Gen3 for certain use cases.
> 
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>

Could we maybe just remove them because there are dedicated counters for
this?

Have a nice weekend,

   Wolfram
Magnus Damm Dec. 5, 2021, 12:45 a.m. UTC | #2
Hi Wolfram,

On Sun, Dec 5, 2021 at 12:30 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
> Hi Magnus,
>
> On Sat, Dec 04, 2021 at 10:46:18PM +0900, Magnus Damm wrote:
> > From: Magnus Damm <damm+renesas@opensource.se>
> >
> > Adjust the console printout handling for frame and parity errors to the same
> > style as for break errors by using dev_dbg() instead of dev_notice().
> > This reduces the amount of console printouts generated by the defconfig kernel
> > on ARM R-Car Gen3 for certain use cases.
> >
> > Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
>
> Could we maybe just remove them because there are dedicated counters for
> this?

Sure, overrun and break also have counters so I'll prepare a patch
removing all four if you don't mind.

Cheers,

/ magnus
Wolfram Sang Dec. 5, 2021, 7:16 a.m. UTC | #3
Hi Magnus,

> Sure, overrun and break also have counters so I'll prepare a patch
> removing all four if you don't mind.

Good idea!

All the best,

   Wolfram
diff mbox series

Patch

--- 0001/drivers/tty/serial/sh-sci.c
+++ work/drivers/tty/serial/sh-sci.c	2021-12-04 22:07:39.760407200 +0900
@@ -895,11 +895,11 @@  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");
+					dev_dbg(port->dev, "frame error\n");
 				} else if (status & SCxSR_PER(port)) {
 					flag = TTY_PARITY;
 					port->icount.parity++;
-					dev_notice(port->dev, "parity error\n");
+					dev_dbg(port->dev, "parity error\n");
 				} else
 					flag = TTY_NORMAL;