* [PATCH net-next] netdev: set __percpu attribute on netdev_alloc_pcpu_stats
@ 2014-03-10 16:41 Stephen Hemminger
2014-03-10 17:44 ` Cong Wang
2014-03-11 20:37 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Stephen Hemminger @ 2014-03-10 16:41 UTC (permalink / raw)
To: David Miller, Cong Wang; +Cc: netdev
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>
--- a/include/linux/netdevice.h 2014-03-03 10:37:53.282147105 -0800
+++ b/include/linux/netdevice.h 2014-03-10 09:32:48.599837500 -0700
@@ -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) { \
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net-next] netdev: set __percpu attribute on netdev_alloc_pcpu_stats 2014-03-10 16:41 [PATCH net-next] netdev: set __percpu attribute on netdev_alloc_pcpu_stats Stephen Hemminger @ 2014-03-10 17:44 ` Cong Wang 2014-03-11 20:37 ` David Miller 1 sibling, 0 replies; 3+ messages in thread From: Cong Wang @ 2014-03-10 17:44 UTC (permalink / raw) To: Stephen Hemminger; +Cc: David Miller, Cong Wang, netdev On Mon, Mar 10, 2014 at 9:41 AM, Stephen Hemminger <stephen@networkplumber.org> wrote: > 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> Thanks for the fix. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] netdev: set __percpu attribute on netdev_alloc_pcpu_stats 2014-03-10 16:41 [PATCH net-next] netdev: set __percpu attribute on netdev_alloc_pcpu_stats Stephen Hemminger 2014-03-10 17:44 ` Cong Wang @ 2014-03-11 20:37 ` David Miller 1 sibling, 0 replies; 3+ messages in thread From: David Miller @ 2014-03-11 20:37 UTC (permalink / raw) To: stephen; +Cc: amwang, netdev From: Stephen Hemminger <stephen@networkplumber.org> Date: Mon, 10 Mar 2014 09:41:46 -0700 > 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> Applied. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-11 20:37 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-03-10 16:41 [PATCH net-next] netdev: set __percpu attribute on netdev_alloc_pcpu_stats Stephen Hemminger 2014-03-10 17:44 ` Cong Wang 2014-03-11 20:37 ` David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).