An out-of-bound index results in an error and should not be logged merely as a debug message; it requires at least a warning level. Therefore, use pr_warn() instead of pr_debug. Additionally, the log message itself has been improved for clarity. Signed-off-by: Andi Shyti <andi.shyti@xxxxxxxxxx> Cc: Jacky Huang <ychuang3@xxxxxxxxxxx> --- drivers/tty/serial/ma35d1_serial.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/ma35d1_serial.c b/drivers/tty/serial/ma35d1_serial.c index 21b574f78b861..bcc402b4c0b2f 100644 --- a/drivers/tty/serial/ma35d1_serial.c +++ b/drivers/tty/serial/ma35d1_serial.c @@ -599,7 +599,8 @@ static int __init ma35d1serial_console_setup(struct console *co, char *options) int flow = 'n'; if ((co->index < 0) || (co->index >= MA35_UART_NR)) { - pr_debug("Console Port%x out of range\n", co->index); + pr_warn("Failed to write on cononsole port %x, out of range\n", + co->index); return -EINVAL; } -- 2.43.0