Re: [PATCH v2 2/9] printk: Rename preferred_console to preferred_dev_console
From: John Ogness
Date: Fri May 15 2026 - 05:24:03 EST
On 2026-04-23, Petr Mladek <pmladek@xxxxxxxx> wrote:
> The preferred_consoles[] array stores information about consoles requested
> via the command line, SPCR, Device Tree, or platform-specific code.
> Within this array, the 'preferred_console' variable tracks the specific
> index that should be associated with /dev/console (typically the last
> non-braille console defined).
>
> The current name "preferred_console" is ambiguous and leads to confusion.
> It does not clearly communicate why one console is "more preferred" than
> others in the array. Furthermore, entries for Braille consoles can exist
> within the preferred_consoles[] array, yet they are never associated with
> /dev/console and do not receive standard printk() output. Consequently,
> the 'preferred_console' index must skip these entries, which is not
> immediately obvious from the name.
>
> Rename the variable to 'preferred_dev_console' to explicitly clarify its
> role in identifying which entry is linked to /dev/console.
>
> The patch should not change the existing behavior.
>
> Signed-off-by: Petr Mladek <pmladek@xxxxxxxx>
> Acked-by: Chris Down <chris@xxxxxxxxxxxxxx>
> Acked-by: Marcos Paulo de Souza <mpdesouza@xxxxxxxx>
Reviewed-by: John Ogness <john.ogness@xxxxxxxxxxxxx>