提交 693350c2 编写于 作者: S stephen hemminger 提交者: David S. Miller

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: NStephen Hemminger <stephen@networkplumber.org>
Acked-by: NCong Wang <cwang@twopensource.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 090f1166
......@@ -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) { \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册