diff options
author | stephen hemminger <stephen@networkplumber.org> | 2014-03-10 12:41:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-11 16:37:14 -0400 |
commit | 693350c2ffe42a21185070b1e8ab77959b45d61e (patch) | |
tree | 50daed39f25b2fd0f0c8071ff5dbd3e85fcd1ea8 /include/linux/netdevice.h | |
parent | 090f1166c6790e18c30f40690098829709e8dc68 (diff) |
netdev: set __percpu attribute on netdev_alloc_pcpu_stats
This patch fixes sparse warnings in vlan driver.
It propagates the sparse __percpu attribute from alloc_percpu
into netdev_alloc_pcpu_stats. I expect it may trigger additional
sparse warnings from other drivers that are missing the __percpu
attribute.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 1a869488b8ae..b8d8c805fd75 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1812,7 +1812,7 @@ struct pcpu_sw_netstats { | |||
1812 | 1812 | ||
1813 | #define netdev_alloc_pcpu_stats(type) \ | 1813 | #define netdev_alloc_pcpu_stats(type) \ |
1814 | ({ \ | 1814 | ({ \ |
1815 | typeof(type) *pcpu_stats = alloc_percpu(type); \ | 1815 | typeof(type) __percpu *pcpu_stats = alloc_percpu(type); \ |
1816 | if (pcpu_stats) { \ | 1816 | if (pcpu_stats) { \ |
1817 | int i; \ | 1817 | int i; \ |
1818 | for_each_possible_cpu(i) { \ | 1818 | for_each_possible_cpu(i) { \ |