--- arch/x86/include/asm/cmpxchg.h 2013-03-18 13:06:40.961286426 +0200 +++ /root/cmpxchg.h 2013-03-18 13:03:43.613301104 +0200 @@ -83,8 +83,8 @@ extern void __add_wrong_size(void) #define __raw_cmpxchg(ptr, old, new, size, lock) \ ({ \ __typeof__(*(ptr)) __ret; \ - __typeof__(*(ptr)) __old = (old); \ - __typeof__(*(ptr)) __new = (new); \ + __typeof__(*(ptr)) __old = (__typeof__(*(ptr)))(old); \ + __typeof__(*(ptr)) __new = (__typeof__(*(ptr)))(new); \ switch (size) { \ case __X86_CASE_B: \ { \