linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Chen, Rong A" <rong.a.chen@intel.com>
Cc: kernel test robot <lkp@intel.com>,
	kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: Re: [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
Date: Mon, 17 Jan 2022 10:14:13 -0500	[thread overview]
Message-ID: <20220117101413.51edd7fa@rorschach.local.home> (raw)
In-Reply-To: <cea7d17b-1994-e2cb-7580-4bd2f287ebdd@intel.com>

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

      reply	other threads:[~2022-01-17 15:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-20 17:12 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 kernel test robot
2022-01-10 23:51 ` Steven Rostedt
2022-01-17  8:32   ` [kbuild-all] " Chen, Rong A
2022-01-17 15:14     ` Steven Rostedt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220117101413.51edd7fa@rorschach.local.home \
    --to=rostedt@goodmis.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=rong.a.chen@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).