aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/veth.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-02-16 10:21:08 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-17 02:05:38 -0500
commit47d742752df4c1088589d4424840bc761613ab2a (patch)
tree186eec2c69a1f7149e08d354c36a34c21b58fa4f /drivers/net/veth.c
parent7d720c3e4f0c4fc152a6bf17e24244a3c85412d2 (diff)
percpu: add __percpu sparse annotations to net drivers
Add __percpu sparse annotations to net drivers. These annotations are to make sparse consider percpu variables to be in a different address space and warn if accessed without going through percpu accessors. This patch doesn't affect normal builds. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: David S. Miller <davem@davemloft.net> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/veth.c')
-rw-r--r--drivers/net/veth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 3a15de56df9c..35609e64f6fd 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -34,7 +34,7 @@ struct veth_net_stats {
34 34
35struct veth_priv { 35struct veth_priv {
36 struct net_device *peer; 36 struct net_device *peer;
37 struct veth_net_stats *stats; 37 struct veth_net_stats __percpu *stats;
38 unsigned ip_summed; 38 unsigned ip_summed;
39}; 39};
40 40
@@ -263,7 +263,7 @@ static int veth_change_mtu(struct net_device *dev, int new_mtu)
263 263
264static int veth_dev_init(struct net_device *dev) 264static int veth_dev_init(struct net_device *dev)
265{ 265{
266 struct veth_net_stats *stats; 266 struct veth_net_stats __percpu *stats;
267 struct veth_priv *priv; 267 struct veth_priv *priv;
268 268
269 stats = alloc_percpu(struct veth_net_stats); 269 stats = alloc_percpu(struct veth_net_stats);