public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: Marcos Paulo de Souza <mpdesouza@suse.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	John Ogness <john.ogness@linutronix.de>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	Jason Wessel <jason.wessel@windriver.com>,
	Daniel Thompson <danielt@kernel.org>,
	Douglas Anderson <dianders@chromium.org>,
	Richard Weinberger <richard@nod.at>,
	Anton Ivanov <anton.ivanov@cambridgegreys.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
	kgdb-bugreport@lists.sourceforge.net,
	linux-um@lists.infradead.org
Subject: Re: [PATCH v2 1/4] drivers: serial: kgdboc: Drop checks for CON_ENABLED and CON_BOOT
Date: Wed, 26 Nov 2025 14:12:19 +0100	[thread overview]
Message-ID: <aSb8s_N4Pc0yTk9f@pathway.suse.cz> (raw)
In-Reply-To: <20251121-printk-cleanup-part2-v2-1-57b8b78647f4@suse.com>

On Fri 2025-11-21 15:50:33, Marcos Paulo de Souza wrote:
> The original code tried to find a console that has CON_BOOT _or_
> CON_ENABLED flag set. The flag CON_ENABLED is set to all registered
> consoles, so in this case this check is always true, even for the
> CON_BOOT consoles.
> 
> The initial intent of the kgdboc_earlycon_init was to get a console
> early (CON_BOOT) or later on in the process (CON_ENABLED). The
> code was using for_each_console macro, meaning that all console structs
> were previously registered on the printk() machinery. At this point,
> any console found on for_each_console is safe for kgdboc_earlycon_init
> to use.
> 
> Dropping the check makes the code cleaner, and avoids further confusion
> by future readers of the code.
> 
> Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>

I agree that the check is superfluous and can be removed:

Reviewed-by: Petr Mladek <pmladek@suse.com>

Best Regards,
Petr

  reply	other threads:[~2025-11-26 13:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-21 18:50 [PATCH v2 0/4] printk cleanup - part 2 Marcos Paulo de Souza
2025-11-21 18:50 ` [PATCH v2 1/4] drivers: serial: kgdboc: Drop checks for CON_ENABLED and CON_BOOT Marcos Paulo de Souza
2025-11-26 13:12   ` Petr Mladek [this message]
2025-11-21 18:50 ` [PATCH v2 2/4] arch: um: kmsg_dump: Use console_is_usable Marcos Paulo de Souza
2025-11-26 13:22   ` Petr Mladek
2025-11-21 18:50 ` [PATCH v2 3/4] printk: Use console_is_usable on console_unblank Marcos Paulo de Souza
2025-11-26 13:24   ` Petr Mladek
2025-11-21 18:50 ` [PATCH v2 4/4] printk: Make console_{suspend,resume} handle CON_SUSPENDED Marcos Paulo de Souza
2025-11-27  9:49   ` Petr Mladek
2025-12-02 12:38     ` Marcos Paulo de Souza
2025-11-27 15:18 ` [PATCH v2 0/4] printk cleanup - part 2 Petr Mladek
2025-11-28  9:52   ` Daniel Thompson
2025-11-28 12:31     ` Petr Mladek
2025-11-28 12:59     ` Marcos Paulo de Souza

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=aSb8s_N4Pc0yTk9f@pathway.suse.cz \
    --to=pmladek@suse.com \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=danielt@kernel.org \
    --cc=dianders@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jason.wessel@windriver.com \
    --cc=jirislaby@kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=john.ogness@linutronix.de \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=mpdesouza@suse.com \
    --cc=richard@nod.at \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    /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