lkml.org 
[lkml]   [2022]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH printk v2 38/38] printk, xen: fbfront: create/use safe function for forcing preferred
Date
On 2022-10-27, Petr Mladek <pmladek@suse.com> wrote:
>> - if (c) {
>> - unregister_console(c);
>> - c->flags |= CON_CONSDEV;
>> - c->flags &= ~CON_PRINTBUFFER; /* don't print again */
>> - register_console(c);
>> - }
>> + if (c)
>> + console_force_preferred(c);
>
> I would prefer to fix this a clean way.
>
> [...]
>
> I would suggest to implement:
>
> [...]
>
> It is a more code. But it is race-free. Also it is much more clear
> what is going on.
>
> How does this sound, please?

I wasn't sure if any of the other preferred-console magic in
register_console() was needed, which is why I kept a full
register_console() call. But if it really is just about forcing it the
head and setting a new CON_CONSDEV, then your suggestion is much
simpler. Thanks.

John

\
 
 \ /
  Last update: 2022-10-27 15:35    [W:0.104 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site