Re: [PATCH v5 01/16] printk: Rename struct console_cmdline to preferred_console
From: Petr Mladek
Date: Tue Nov 03 2026 - 10:39:00 EST
On Thu 2026-10-29 15:03:39, Chris Down wrote:
> Petr Mladek writes:
> >The structure 'console_cmdline' was originally intended to store details
> >about consoles defined on the kernel command line. However, its usage
> >has since expanded; it now stores information for consoles preferred
> >via SPCR, device tree, or by particular platforms, e.g. XEN.
>
> >@@ -362,9 +362,9 @@ static int console_locked;
> > * Array of consoles built from command line options (console=)
>
> This comment still says "Array of consoles built from command line options
> (console=)", which is exactly what the rename is meant to stop implying (as in,
> the array also holds SPCR, DT, etc). Could be updated in this patch if you
> respin.
Great catch! I am going to do the following change in v6:
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -359,11 +359,10 @@ static void __up_console_sem(unsigned long ip)
static int console_locked;
/*
- * Array of consoles built from command line options (console=)
+ * Array of consoles preferred via the command line, or by
+ * some platform-specific code, e.g. SPCR, or DT.
*/
-
#define MAX_PREFERRED_CONSOLES 8
-
static struct preferred_console preferred_consoles[MAX_PREFERRED_CONSOLES];
static int preferred_console = -1;
Best Regards,
Petr