From d3097efff7c612e25cbbcf4913c703a73b57e523 Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Sat, 4 Dec 2010 11:39:53 -0800 Subject: [PATCH] datapath: Add usage of __percpu annotation. Sparse can warn if percpu pointers are incorrectly directly dereference. This adds the annotation where we declare percpu pointers. Signed-off-by: Jesse Gross Acked-by: Ben Pfaff --- datapath/datapath.h | 2 +- datapath/vport.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/datapath/datapath.h b/datapath/datapath.h index c55e2059..66ade3e1 100644 --- a/datapath/datapath.h +++ b/datapath/datapath.h @@ -96,7 +96,7 @@ struct datapath { struct list_head port_list; /* Stats. */ - struct dp_stats_percpu *stats_percpu; + struct dp_stats_percpu __percpu *stats_percpu; /* sFlow Sampling */ unsigned int sflow_probability; diff --git a/datapath/vport.h b/datapath/vport.h index b98c461e..fb3a3e37 100644 --- a/datapath/vport.h +++ b/datapath/vport.h @@ -115,7 +115,7 @@ struct vport { struct hlist_node hash_node; const struct vport_ops *ops; - struct vport_percpu_stats *percpu_stats; + struct vport_percpu_stats __percpu *percpu_stats; spinlock_t stats_lock; struct vport_err_stats err_stats; -- 2.30.2