Re: [PATCH v2] static_key: Improve uninizialized key warning

From: Ingo Molnar
Date: Thu Oct 19 2017 - 01:33:37 EST



* Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> On Wed, 18 Oct 2017 12:06:59 -0400
> Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> > > Signed-off-by: Borislav Petkov <bp@xxxxxxx>
> > > Cc: Hannes Frederic Sowa <hannes@xxxxxxxxxxxxxxxxxxx>
> > > Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> > > Cc: Juergen Gross <jgross@xxxxxxxx>
> > > Cc: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx>
> >
> > Reviewed-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
> >
>
>
> Ingo, you may want to fix the typo in the subject "uninitialized".

Yeah, I also changed it to %pS to help debug arrays, or cases where somehow a
non-data symbol ends up being passed to it. Plus I changed the message from:

static_key_disable_cpuslocked, key virt_spin_lock_key used before call to jump_label_init.

to:

static_key_disable_cpuslocked() static key 'virt_spin_lock_key' used before call to jump_label_init()

to make it all obviously readable. I mean, what if the symbol is named 'key' and
we'd get confusing printouts like:

static_key_disable_cpuslocked, key key used before call to jump_label_init.

Plus functions should be referred to with () to disambiguate them from other
symbol names. Also, proper use of punctuation symbols.

Thanks,

Ingo