lkml.org 
[lkml]   [2022]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] printk: Set console_set_on_cmdline=1 when __add_preferred_console() is called with user_specified == true
On (22/02/14 14:21), Andre Kalb wrote:
> +static void set_user_specified(struct console_cmdline *c, bool user_specified)
> +{
> + if (!user_specified)
> + return;
> +
> + c->user_specified = true;
> + console_set_on_cmdline = 1;
> +}

In original code we always set c->user_specified. Is it guaranteed that
->user_specified is properly initialized to 0? Maybe can do something like:

static void set_user_specified(struct console_cmdline *c, bool user_specified)
{
c->user_specified = user_specified;

if (!user_specified)
return;

console_set_on_cmdline = 1;
}

\
 
 \ /
  Last update: 2022-02-15 04:17    [W:0.066 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site