public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Fengguang Wu <fengguang.wu@intel.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Christopher Li <sparse@chrisli.org>
Subject: Re: [trace:tip/perf/core 5/15] kernel/trace/trace_functions.c:79:16: sparse: incorrect type in initializer (different address spaces)
Date: Sat, 2 Mar 2013 21:23:30 +0800	[thread overview]
Message-ID: <20130302132330.GA15256@localhost> (raw)
In-Reply-To: <1362230122.31874.8.camel@gandalf.local.home>

On Sat, Mar 02, 2013 at 08:15:22AM -0500, Steven Rostedt wrote:
> On Sat, 2013-03-02 at 08:12 -0500, Steven Rostedt wrote:
> 
> > Hmm, actually it seems to be complaining everywhere but in trace.c which
> > is where the per_cpu was allocated. Do I need to annotate the trace.h
> > header to specify (at least to sparse) that the pointer is allocated per
> > cpu?
> 
> I guess I need this patch:

That's it!  Verified with

        make C=1 kernel/trace/trace_functions.o

Thanks,
Fengguang

> diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
> index c597523..50a9c81 100644
> --- a/kernel/trace/trace.h
> +++ b/kernel/trace/trace.h
> @@ -198,7 +198,7 @@ struct trace_array {
>         struct list_head        systems;
>         struct list_head        events;
>         struct task_struct      *waiter;
> -       struct trace_array_cpu  *data;
> +       struct trace_array_cpu __percpu *data;
>  };
>  
>  enum {
> 
> -- Steve
> 

  reply	other threads:[~2013-03-02 13:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5131ad43.H709l5IR4X+pbvbq%fengguang.wu@intel.com>
2013-03-02 13:12 ` [trace:tip/perf/core 5/15] kernel/trace/trace_functions.c:79:16: sparse: incorrect type in initializer (different address spaces) Steven Rostedt
2013-03-02 13:15   ` Steven Rostedt
2013-03-02 13:23     ` Fengguang Wu [this message]
2013-03-03  6:12       ` Christopher Li
2013-03-03  6:42         ` Fengguang Wu
2013-03-02 13:15   ` Fengguang Wu

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=20130302132330.GA15256@localhost \
    --to=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sparse@chrisli.org \
    /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