* [PATCH printk v2 14/38] tty: serial: samsung_tty: use console_is_enabled() [not found] <20221019145600.1282823-1-john.ogness@linutronix.de> @ 2022-10-19 14:55 ` John Ogness 2022-10-19 16:00 ` Greg Kroah-Hartman 2022-10-21 14:14 ` Petr Mladek 2022-10-19 14:55 ` [PATCH printk v2 16/38] tty: serial: xilinx_uartps: " John Ogness 1 sibling, 2 replies; 6+ messages in thread From: John Ogness @ 2022-10-19 14:55 UTC (permalink / raw) To: Petr Mladek Cc: Sergey Senozhatsky, Steven Rostedt, Thomas Gleixner, linux-kernel, Krzysztof Kozlowski, Alim Akhtar, Greg Kroah-Hartman, Jiri Slaby, linux-arm-kernel, linux-samsung-soc, linux-serial Replace (console->flags & CON_ENABLED) usage with console_is_enabled(). Signed-off-by: John Ogness <john.ogness@linutronix.de> --- drivers/tty/serial/samsung_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 77d1363029f5..8142a0e53ffa 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -1732,7 +1732,7 @@ static void __init s3c24xx_serial_register_console(void) static void s3c24xx_serial_unregister_console(void) { - if (s3c24xx_serial_console.flags & CON_ENABLED) + if (console_is_enabled(&s3c24xx_serial_console)) unregister_console(&s3c24xx_serial_console); } -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH printk v2 14/38] tty: serial: samsung_tty: use console_is_enabled() 2022-10-19 14:55 ` [PATCH printk v2 14/38] tty: serial: samsung_tty: use console_is_enabled() John Ogness @ 2022-10-19 16:00 ` Greg Kroah-Hartman 2022-10-21 14:14 ` Petr Mladek 1 sibling, 0 replies; 6+ messages in thread From: Greg Kroah-Hartman @ 2022-10-19 16:00 UTC (permalink / raw) To: John Ogness Cc: Petr Mladek, Sergey Senozhatsky, Steven Rostedt, Thomas Gleixner, linux-kernel, Krzysztof Kozlowski, Alim Akhtar, Jiri Slaby, linux-arm-kernel, linux-samsung-soc, linux-serial On Wed, Oct 19, 2022 at 05:01:36PM +0206, John Ogness wrote: > Replace (console->flags & CON_ENABLED) usage with console_is_enabled(). > > Signed-off-by: John Ogness <john.ogness@linutronix.de> > --- > drivers/tty/serial/samsung_tty.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH printk v2 14/38] tty: serial: samsung_tty: use console_is_enabled() 2022-10-19 14:55 ` [PATCH printk v2 14/38] tty: serial: samsung_tty: use console_is_enabled() John Ogness 2022-10-19 16:00 ` Greg Kroah-Hartman @ 2022-10-21 14:14 ` Petr Mladek 1 sibling, 0 replies; 6+ messages in thread From: Petr Mladek @ 2022-10-21 14:14 UTC (permalink / raw) To: John Ogness Cc: Sergey Senozhatsky, Steven Rostedt, Thomas Gleixner, linux-kernel, Krzysztof Kozlowski, Alim Akhtar, Greg Kroah-Hartman, Jiri Slaby, linux-arm-kernel, linux-samsung-soc, linux-serial On Wed 2022-10-19 17:01:36, John Ogness wrote: > Replace (console->flags & CON_ENABLED) usage with console_is_enabled(). > > Signed-off-by: John Ogness <john.ogness@linutronix.de> > --- > drivers/tty/serial/samsung_tty.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c > index 77d1363029f5..8142a0e53ffa 100644 > --- a/drivers/tty/serial/samsung_tty.c > +++ b/drivers/tty/serial/samsung_tty.c > @@ -1732,7 +1732,7 @@ static void __init s3c24xx_serial_register_console(void) > > static void s3c24xx_serial_unregister_console(void) > { > - if (s3c24xx_serial_console.flags & CON_ENABLED) > + if (console_is_enabled(&s3c24xx_serial_console)) > unregister_console(&s3c24xx_serial_console); > } As on many other locations, it would be better to check if the console is in console_list. CON_ENABLED might be disabled even when the console is registered. It would be nice to fix this. But it might be done later. Reviewed-by: Petr Mladek <pmladek@suse.com> Best Regards, Petr _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH printk v2 16/38] tty: serial: xilinx_uartps: use console_is_enabled() [not found] <20221019145600.1282823-1-john.ogness@linutronix.de> 2022-10-19 14:55 ` [PATCH printk v2 14/38] tty: serial: samsung_tty: use console_is_enabled() John Ogness @ 2022-10-19 14:55 ` John Ogness 2022-10-19 16:01 ` Greg Kroah-Hartman 2022-10-21 14:23 ` Petr Mladek 1 sibling, 2 replies; 6+ messages in thread From: John Ogness @ 2022-10-19 14:55 UTC (permalink / raw) To: Petr Mladek Cc: Sergey Senozhatsky, Steven Rostedt, Thomas Gleixner, linux-kernel, Greg Kroah-Hartman, Jiri Slaby, Michal Simek, linux-serial, linux-arm-kernel Replace (console->flags & CON_ENABLED) usage with console_is_enabled(). Signed-off-by: John Ogness <john.ogness@linutronix.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; } -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH printk v2 16/38] tty: serial: xilinx_uartps: use console_is_enabled() 2022-10-19 14:55 ` [PATCH printk v2 16/38] tty: serial: xilinx_uartps: " John Ogness @ 2022-10-19 16:01 ` Greg Kroah-Hartman 2022-10-21 14:23 ` Petr Mladek 1 sibling, 0 replies; 6+ messages in thread From: Greg Kroah-Hartman @ 2022-10-19 16:01 UTC (permalink / raw) To: John Ogness Cc: Petr Mladek, Sergey Senozhatsky, Steven Rostedt, Thomas Gleixner, linux-kernel, Jiri Slaby, Michal Simek, linux-serial, linux-arm-kernel On Wed, Oct 19, 2022 at 05:01:38PM +0206, John Ogness wrote: > Replace (console->flags & CON_ENABLED) usage with console_is_enabled(). > > Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH printk v2 16/38] tty: serial: xilinx_uartps: use console_is_enabled() 2022-10-19 14:55 ` [PATCH printk v2 16/38] tty: serial: xilinx_uartps: " John Ogness 2022-10-19 16:01 ` Greg Kroah-Hartman @ 2022-10-21 14:23 ` Petr Mladek 1 sibling, 0 replies; 6+ messages in thread From: Petr Mladek @ 2022-10-21 14:23 UTC (permalink / raw) To: John Ogness Cc: Sergey Senozhatsky, Steven Rostedt, Thomas Gleixner, linux-kernel, Greg Kroah-Hartman, Jiri Slaby, Michal Simek, linux-serial, linux-arm-kernel 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@linutronix.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@suse.com> Best Regards, Petr _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-10-21 14:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20221019145600.1282823-1-john.ogness@linutronix.de>
2022-10-19 14:55 ` [PATCH printk v2 14/38] tty: serial: samsung_tty: use console_is_enabled() John Ogness
2022-10-19 16:00 ` Greg Kroah-Hartman
2022-10-21 14:14 ` Petr Mladek
2022-10-19 14:55 ` [PATCH printk v2 16/38] tty: serial: xilinx_uartps: " John Ogness
2022-10-19 16:01 ` Greg Kroah-Hartman
2022-10-21 14:23 ` Petr Mladek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).