lkml.org 
[lkml]   [2008]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] x86: simplify sync_test_bit()
Ingo Molnar wrote:
> * Jan Beulich <jbeulich@novell.com> 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@citrix.com>
---
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




\
 
 \ /
  Last update: 2008-03-22 21:35    [W:0.078 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site