Re: [PATCH] x86: simplify sync_test_bit()

From: Jeremy Fitzhardinge
Date: Sat Mar 22 2008 - 16:32:12 EST


Ingo Molnar wrote:
* Jan Beulich <jbeulich@xxxxxxxxxx> wrote:

There really is no need for a redundant implementation here, just keep the alternative name for allowing consumers to use consistent naming.

- __asm__ __volatile__("btl %2,%1\n\tsbbl %0,%0"
- :"=r" (oldbit)
- :"m" (ADDR),"Ir" (nr));

+#define sync_test_bit test_bit

thanks, applied.

Please use this instead.

J

Subject: x86: use macro parameters on sync_test_bit

Using a naked parameterless macro could lead to other tokens being
unexpectedly replaced.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
---
include/asm-x86/sync_bitops.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

===================================================================
--- a/include/asm-x86/sync_bitops.h
+++ b/include/asm-x86/sync_bitops.h
@@ -123,7 +123,7 @@
return oldbit;
}

-#define sync_test_bit test_bit
+#define sync_test_bit(nr, addr) test_bit(nr, addr)

#undef ADDR



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/