Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 693350c2 authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller
Browse files

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: default avatarStephen Hemminger <stephen@networkplumber.org>
Acked-by: default avatarCong Wang <cwang@twopensource.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 090f1166
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {			\