Title: [5764] trunk/arch/blackfin/include/asm/bitops.h: Remove __constant_test_bit(), as __test_bit() can do all the thing.
Revision
5764
Author
gyang
Date
2008-11-30 22:26:10 -0600 (Sun, 30 Nov 2008)

Log Message

Remove __constant_test_bit(), as __test_bit() can do all the thing.

Modified Paths


Diff

Modified: trunk/arch/blackfin/include/asm/bitops.h (5763 => 5764)


--- trunk/arch/blackfin/include/asm/bitops.h	2008-12-01 04:17:38 UTC (rev 5763)
+++ trunk/arch/blackfin/include/asm/bitops.h	2008-12-01 04:26:10 UTC (rev 5764)
@@ -166,15 +166,6 @@
 	return retval;
 }
 
-/*
- * This routine doesn't need to go through raw atomic ops in UP
- * context.
- */
-#define test_bit(nr,addr) \
-(__builtin_constant_p(nr) ? \
- __constant_test_bit((nr), (addr)) : \
- __test_bit((nr), (addr)))
-
 #endif /* CONFIG_SMP */
 
 /*
@@ -250,12 +241,6 @@
 	return retval;
 }
 
-static inline int __constant_test_bit(int nr, const void *addr)
-{
-	return ((1UL << (nr & 31)) &
-		(((const volatile unsigned int *)addr)[nr >> 5])) != 0;
-}
-
 static inline int __test_bit(int nr, const void *addr)
 {
 	int *a = (int *)addr;
@@ -266,6 +251,17 @@
 	return ((mask & *a) != 0);
 }
 
+#ifndef CONFIG_SMP
+/*
+ * This routine doesn't need irq save and restore ops in UP
+ * context.
+ */
+static inline int test_bit(int nr, const void *addr)
+{
+	return __test_bit(nr, addr);
+}
+#endif
+
 #include <asm-generic/bitops/find.h>
 #include <asm-generic/bitops/hweight.h>
 #include <asm-generic/bitops/lock.h>
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to