From 693350c2ffe42a21185070b1e8ab77959b45d61e Mon Sep 17 00:00:00 2001 From: stephen hemminger Date: Mon, 10 Mar 2014 09:41:46 -0700 Subject: 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 Acked-by: Cong Wang Signed-off-by: David S. Miller --- include/linux/netdevice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux/netdevice.h') diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 1a869488b8a..b8d8c805fd7 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1812,7 +1812,7 @@ struct pcpu_sw_netstats { #define netdev_alloc_pcpu_stats(type) \ ({ \ - typeof(type) *pcpu_stats = alloc_percpu(type); \ + typeof(type) __percpu *pcpu_stats = alloc_percpu(type); \ if (pcpu_stats) { \ int i; \ for_each_possible_cpu(i) { \ -- cgit v1.2.3-70-g09d2