Re: [PATCH v2 2/3] printk: rename selected_console -> preferred_console

From: Petr Mladek
Date: Wed Mar 15 2017 - 05:01:05 EST


On Thu 2017-03-02 10:01:53, Steven Rostedt wrote:
> On Thu, 2 Mar 2017 16:11:33 +0300
> Aleksey Makarov <aleksey.makarov@xxxxxxxxxx> wrote:
>
> > The variable selected_console is set in __add_preferred_console()
> > to point to the last console parameter that was added to the
> > console_cmdline array.
> >
> > Rename it to preferred_console so that the name reflects the usage.
>
> As I said previously, I prefer "selected_console" but since
> "__add_preferred_console()" sets it, I'm fine with this change.
> Although, I would probably have changed that function to
> "__add_selected_console()" :)

If I get it correctly, the selected_console/preferred_console
value is used to keep the console first in the console_drivers list.
IMHO, the main effect is that each line will first appear on this
console, see call_console_drivers(). But the message will still
appear also on all other enabled consoles. From this point,
the name "preferred" sounds better to me. More consoles
are selected (enabled) and only one is preferred (first).

Well, I am not a native speaker and might be wrong. Also
it is possible that I missed something.

Anyway, the change looks fine to me.

Acked-by: Petr Mladek <pmladek@xxxxxxxx>

Best Regards,
Petr