[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y1KrcPBmC0ZNlxKc@alley>
Date: Fri, 21 Oct 2022 16:23:44 +0200
From: Petr Mladek <pmladek@...e.com>
To: John Ogness <john.ogness@...utronix.de>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
Michal Simek <michal.simek@...inx.com>,
linux-serial@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH printk v2 16/38] tty: serial: xilinx_uartps: use
console_is_enabled()
On Wed 2022-10-19 17:01:38, John Ogness wrote:
> Replace (console->flags & CON_ENABLED) usage with console_is_enabled().
>
> Signed-off-by: John Ogness <john.ogness@...utronix.de>
> ---
> drivers/tty/serial/xilinx_uartps.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
> index 2eff7cff57c4..e1fe95bd55c1 100644
> --- a/drivers/tty/serial/xilinx_uartps.c
> +++ b/drivers/tty/serial/xilinx_uartps.c
> @@ -1631,7 +1631,7 @@ static int cdns_uart_probe(struct platform_device *pdev)
> #ifdef CONFIG_SERIAL_XILINX_PS_UART_CONSOLE
> /* This is not port which is used for console that's why clean it up */
> if (console_port == port &&
> - !(cdns_uart_uart_driver.cons->flags & CON_ENABLED)) {
> + !console_is_enabled(cdns_uart_uart_driver.cons)) {
> console_port = NULL;
> cdns_uart_console.index = -1;
Again, IMHO, we should check here if the console is in console_list.
We should not clean the port and index when the console is already
registered.
Again, this is old problem that might be fixed later.
The change is straightforward. Feel free to use:
Reviewed-by: Petr Mladek <pmladek@...e.com>
Best Regards,
Petr
Powered by blists - more mailing lists