public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lib/atomic64_test: do not build on non-atomic64 systems
@ 2010-10-16 17:27 Mike Frysinger
  2010-10-21 22:02 ` Andrew Morton
  0 siblings, 1 reply; 13+ messages in thread
From: Mike Frysinger @ 2010-10-16 17:27 UTC (permalink / raw)
  To: Luca Barbieri; +Cc: linux-kernel, Andrew Morton

If the arch doesn't provide atomic64 functionality (there are quite a
few), then don't bother trying to build this test.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 lib/atomic64_test.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/lib/atomic64_test.c b/lib/atomic64_test.c
index 250ed11..0ac1a66 100644
--- a/lib/atomic64_test.c
+++ b/lib/atomic64_test.c
@@ -12,6 +12,8 @@
 #include <linux/kernel.h>
 #include <asm/atomic.h>
 
+#ifdef ATOMIC64_INIT
+
 #define INIT(c) do { atomic64_set(&v, c); r = c; } while (0)
 static __init int test_atomic64(void)
 {
@@ -164,3 +166,5 @@ static __init int test_atomic64(void)
 }
 
 core_initcall(test_atomic64);
+
+#endif
-- 
1.7.3.1


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

end of thread, other threads:[~2010-10-25  1:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-16 17:27 [PATCH] lib/atomic64_test: do not build on non-atomic64 systems Mike Frysinger
2010-10-21 22:02 ` Andrew Morton
2010-10-21 22:23   ` Mike Frysinger
2010-10-21 22:55     ` Andrew Morton
2010-10-21 23:04       ` Mike Frysinger
2010-10-21 23:24         ` Andrew Morton
2010-10-22 20:14           ` Mike Frysinger
2010-10-22 20:31             ` Andrew Morton
2010-10-22 20:47               ` Mike Frysinger
2010-10-22 21:00                 ` Andrew Morton
2010-10-22 21:07                   ` Mike Frysinger
2010-10-24 16:20               ` Roland Dreier
2010-10-25  1:52                 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox