lkml.org 
[lkml]   [2022]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [kbuild-all] Re: WARNING: modpost: vmlinux.o(.text.unlikely+0x2c44): Section mismatch in reference from the function trace_define_generic_fields() to the variable .init.data:initcall_level_names
On Mon, 17 Jan 2022 16:32:38 +0800
"Chen, Rong A" <rong.a.chen@intel.com> wrote:

> >
> > Please tell me where initcall_level_names is being referenced?
> >
> > Either fix the compiler or tell me exactly what the bug is. Otherwise, stop
> > sending me this.
> >
> > -- Steve
>
> Hi Steve,
>
> I'm not familiar with the code, the warning can be silenced with the
> below change:
>
> --- a/kernel/trace/trace_events.c
> +++ b/kernel/trace/trace_events.c
> @@ -162,7 +162,7 @@ EXPORT_SYMBOL_GPL(trace_define_field);
> if (ret) \
> return ret;
>
> -static int trace_define_generic_fields(void)
> +static __init int trace_define_generic_fields(void)
> {
> int ret;
>
> @@ -174,7 +174,7 @@ static int trace_define_generic_fields(void)
> return ret;
> }
>
> -static int trace_define_common_fields(void)
> +static __init int trace_define_common_fields(void)
> {
> int ret;
> struct trace_entry ent;
>
> If the warning can't be fixed, we'll add the warning to the ignore list.
>

So the issue is that an __init function calls a static function that
isn't marked as __init?

I guess it can be updated, but seriously, there's nothing bad that can
happen with the above, and it still looks to me as an over aggressive
compiler.

-- Steve

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