* [PATCH printk v3 29/40] tty: serial: samsung_tty: use console_is_registered()
[not found] <20221107141638.3790965-1-john.ogness@linutronix.de>
@ 2022-11-07 14:16 ` John Ogness
2022-11-10 15:01 ` Petr Mladek
2022-11-07 14:16 ` [PATCH printk v3 30/40] tty: serial: xilinx_uartps: " John Ogness
1 sibling, 1 reply; 4+ messages in thread
From: John Ogness @ 2022-11-07 14:16 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
It is not reliable to check for CON_ENABLED in order to identify if a
console is registered. Use console_is_registered() instead.
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..9c252c9ca95a 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_registered(&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] 4+ messages in thread
* [PATCH printk v3 30/40] tty: serial: xilinx_uartps: use console_is_registered()
[not found] <20221107141638.3790965-1-john.ogness@linutronix.de>
2022-11-07 14:16 ` [PATCH printk v3 29/40] tty: serial: samsung_tty: use console_is_registered() John Ogness
@ 2022-11-07 14:16 ` John Ogness
2022-11-10 15:04 ` Petr Mladek
1 sibling, 1 reply; 4+ messages in thread
From: John Ogness @ 2022-11-07 14:16 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
It is not reliable to check for CON_ENABLED in order to identify if a
console is registered. Use console_is_registered() instead.
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..0cbd1892c53b 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_registered(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] 4+ messages in thread
* Re: [PATCH printk v3 29/40] tty: serial: samsung_tty: use console_is_registered()
2022-11-07 14:16 ` [PATCH printk v3 29/40] tty: serial: samsung_tty: use console_is_registered() John Ogness
@ 2022-11-10 15:01 ` Petr Mladek
0 siblings, 0 replies; 4+ messages in thread
From: Petr Mladek @ 2022-11-10 15:01 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 Mon 2022-11-07 15:22:27, John Ogness wrote:
> It is not reliable to check for CON_ENABLED in order to identify if a
> console is registered. Use console_is_registered() instead.
>
> Signed-off-by: John Ogness <john.ogness@linutronix.de>
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] 4+ messages in thread
* Re: [PATCH printk v3 30/40] tty: serial: xilinx_uartps: use console_is_registered()
2022-11-07 14:16 ` [PATCH printk v3 30/40] tty: serial: xilinx_uartps: " John Ogness
@ 2022-11-10 15:04 ` Petr Mladek
0 siblings, 0 replies; 4+ messages in thread
From: Petr Mladek @ 2022-11-10 15:04 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 Mon 2022-11-07 15:22:28, John Ogness wrote:
> It is not reliable to check for CON_ENABLED in order to identify if a
> console is registered. Use console_is_registered() instead.
>
> Signed-off-by: John Ogness <john.ogness@linutronix.de>
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] 4+ messages in thread
end of thread, other threads:[~2022-11-10 15:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20221107141638.3790965-1-john.ogness@linutronix.de>
2022-11-07 14:16 ` [PATCH printk v3 29/40] tty: serial: samsung_tty: use console_is_registered() John Ogness
2022-11-10 15:01 ` Petr Mladek
2022-11-07 14:16 ` [PATCH printk v3 30/40] tty: serial: xilinx_uartps: " John Ogness
2022-11-10 15:04 ` Petr Mladek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox