[for-next][PATCH 4/6] tracing: Add __per_cpu annotation to trace array percpu data pointer

From: Steven Rostedt
Date: Mon Mar 04 2013 - 12:27:26 EST


From: "Steven Rostedt (Red Hat)" <srostedt@xxxxxxxxxx>

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@xxxxxxxxx>
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
kernel/trace/trace.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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 {
--
1.7.10.4


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/