Skip to content

Commit

Permalink
tracing: Add __per_cpu annotation to trace array percpu data pointer
Browse files Browse the repository at this point in the history
With the conversion of the data array to per cpu, sparse now complains
about the use of per_cpu_ptr() on the variable. But The variable is
allocated with alloc_percpu() and is fine to use. But since the structure
that contains the data variable does not annotate it as such, sparse
gives out a lot of false warnings.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Steven Rostedt (Red Hat) authored and Steven Rostedt committed Mar 15, 2013
1 parent b8aae39 commit 34ef61b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/trace/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 34ef61b

Please sign in to comment.