All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] percpu: remove address_space attribute if !SMP
@ 2010-08-06 12:46 ` Namhyung Kim
  0 siblings, 0 replies; 14+ messages in thread
From: Namhyung Kim @ 2010-08-06 12:46 UTC (permalink / raw)
  To: tj; +Cc: linux-kernel, kernel-janitors

percpu data has no special meaning in case of !CONFIG_SMP.
This removes lots of sparse warnings.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>

diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index a5a472b..8dfd41d 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -15,7 +15,11 @@
 # define __acquire(x)	__context__(x,1)
 # define __release(x)	__context__(x,-1)
 # define __cond_lock(x,c)	((c) ? ({ __acquire(x); 1; }) : 0)
-# define __percpu	__attribute__((noderef, address_space(3)))
+# ifdef CONFIG_SMP
+#  define __percpu	__attribute__((noderef, address_space(3)))
+# else
+#  define __percpu
+# endif
 extern void __chk_user_ptr(const volatile void __user *);
 extern void __chk_io_ptr(const volatile void __iomem *);
 #else
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-08-06 13:46 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-06 12:46 [PATCH] percpu: remove address_space attribute if !SMP Namhyung Kim
2010-08-06 12:46 ` Namhyung Kim
2010-08-06 12:49 ` Tejun Heo
2010-08-06 12:49   ` Tejun Heo
2010-08-06 12:53   ` Namhyung Kim
2010-08-06 12:53     ` Namhyung Kim
2010-08-06 12:57     ` Tejun Heo
2010-08-06 12:57       ` Tejun Heo
2010-08-06 13:23       ` Namhyung Kim
2010-08-06 13:23         ` Namhyung Kim
2010-08-06 13:37         ` Tejun Heo
2010-08-06 13:37           ` Tejun Heo
2010-08-06 13:46           ` Namhyung Kim
2010-08-06 13:46             ` Namhyung Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.