netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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

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).