From: Petr Mladek <pmladek@suse.com>
To: John Ogness <john.ogness@linutronix.de>
Cc: linuxppc-dev@lists.ozlabs.org,
Xianting Tian <xianting.tian@linux.alibaba.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Shile Zhang <shile.zhang@linux.alibaba.com>,
linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Thomas Gleixner <tglx@linutronix.de>,
Jiri Slaby <jirislaby@kernel.org>
Subject: Re: [PATCH printk v2 10/38] tty: hvc: use console_is_enabled()
Date: Fri, 21 Oct 2022 15:22:17 +0200 [thread overview]
Message-ID: <Y1KdCes7Ag6wJ3DE@alley> (raw)
In-Reply-To: <20221019145600.1282823-11-john.ogness@linutronix.de>
On Wed 2022-10-19 17:01:32, John Ogness wrote:
> Replace (console->flags & CON_ENABLED) usage with console_is_enabled().
>
> Signed-off-by: John Ogness <john.ogness@linutronix.de>
> ---
> drivers/tty/hvc/hvc_console.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
> index 4802cfaa107f..6d1d7b72488c 100644
> --- a/drivers/tty/hvc/hvc_console.c
> +++ b/drivers/tty/hvc/hvc_console.c
> @@ -265,7 +265,7 @@ static void hvc_port_destruct(struct tty_port *port)
> static void hvc_check_console(int index)
> {
> /* Already enabled, bail out */
> - if (hvc_console.flags & CON_ENABLED)
> + if (console_is_enabled(&hvc_console))
> return;
The check is not reliable. The console might be disabled even when
it is already registered.
I would be nice to fix this. But it might be done later.
Feel free to use:
Reviewed-by: Petr Mladek <pmladek@suse.com>
>
> /* If this index is what the user requested, then register
Best Regards,
Petr
prev parent reply other threads:[~2022-10-21 13:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 14:55 [PATCH printk v2 00/38] reduce console_lock scope John Ogness
2022-10-19 14:55 ` [PATCH printk v2 10/38] tty: hvc: use console_is_enabled() John Ogness
2022-10-19 16:01 ` Greg Kroah-Hartman
2022-10-21 13:22 ` Petr Mladek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y1KdCes7Ag6wJ3DE@alley \
--to=pmladek@suse.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=shile.zhang@linux.alibaba.com \
--cc=tglx@linutronix.de \
--cc=xianting.tian@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox