s390/cmpxchg: simplify cmpxchg_double
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Sat, 14 Feb 2015 10:10:14 +0000 (11:10 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 25 Mar 2015 10:49:36 +0000 (11:49 +0100)
Since sizeof(long) == 4 is always false now, simplify cmpxchg_double a bit.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/cmpxchg.h

index 6259895fcd979a4e7255d7978c5487d70b3c6c83..4eadec466b8ca3ecc5ba29881856fef9f85d79f3 100644 (file)
@@ -80,15 +80,10 @@ extern void __cmpxchg_double_called_with_bad_pointer(void);
 ({                                                                     \
        __typeof__(p1) __p1 = (p1);                                     \
        __typeof__(p2) __p2 = (p2);                                     \
-       int __ret;                                                      \
        BUILD_BUG_ON(sizeof(*(p1)) != sizeof(long));                    \
        BUILD_BUG_ON(sizeof(*(p2)) != sizeof(long));                    \
        VM_BUG_ON((unsigned long)((__p1) + 1) != (unsigned long)(__p2));\
-       if (sizeof(long) == 4)                                          \
-               __ret = __cmpxchg_double_4(__p1, __p2, o1, o2, n1, n2); \
-       else                                                            \
-               __ret = __cmpxchg_double_8(__p1, __p2, o1, o2, n1, n2); \
-       __ret;                                                          \
+       __cmpxchg_double_8(__p1, __p2, o1, o2, n1, n2);                 \
 })
 
 #define system_has_cmpxchg_double()    1