Re: [PATCH 1/8] printk: Rename struct console_cmdline to preferred_console

From: Marcos Paulo de Souza

Date: Thu Feb 19 2026 - 13:34:33 EST


On Fri, 2026-02-06 at 17:49 +0100, Petr Mladek wrote:
> 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.
>
> The current naming is misleading as it implies the configuration only
> originates from the command line.
>
> Rename the structure and associated artifacts to better reflect their
> current purpose, for example:
>
>   - struct console_cmdline c -> struct preferred_console pc
>   - console_cmdline[]        -> preferred_consoles[]
>   - console_cmdline.h        -> console_register.h
>   - c      -> pc
>
> Additionally, renaming the header file to console_register.h would
> eventually allow to decouple console registration logic from
> the monolithic printk.c.
>
> Finally, renaming the local variable from "c" to "pc" helps to
> distinguish
> it from struct console variables. Note that "c" is used for struct
> console
> in some code, for example see vt_console_device() function
> definition.
>
> Signed-off-by: Petr Mladek <pmladek@xxxxxxxx>

The renaming is very welcome, since it was indeed confusing to
distinguish between console_cmdline, struct console and whatnot.

Acked-by: Marcos Paulo de Souza <mpdesouza@xxxxxxxx>