s390: Fix some compiler warnings
authorJan Blunck <jblunck@suse.de>
Wed, 17 Jun 2009 11:49:44 +0000 (13:49 +0200)
committerJan Blunck <jblunck@suse.de>
Mon, 29 Jun 2009 09:47:22 +0000 (11:47 +0200)
Fix warning about _atomic_exchange being defined but unused and explicitly
cast the 2nd argument.

Signed-off-by: Jan Blunck <jblunck@suse.de>
arch_atomic_s390.h

index cb85e6a0ae80b83698f2a23ba1630ff53ca3425a..37fb89f407c6efb4ddd6b257c94747bf3817fd8f 100644 (file)
@@ -29,7 +29,7 @@
 
 #ifndef _INCLUDE_API_H
 
-static __attribute__((always_inline))
+static inline __attribute__((always_inline))
 unsigned int atomic_exchange_32(volatile unsigned int *addr, unsigned int val)
 {
        unsigned int result;
@@ -46,7 +46,7 @@ unsigned int atomic_exchange_32(volatile unsigned int *addr, unsigned int val)
 
 #if (BITS_PER_LONG == 64)
 
-static __attribute__((always_inline))
+static inline __attribute__((always_inline))
 unsigned long atomic_exchange_64(volatile unsigned long *addr,
                                 unsigned long val)
 {
@@ -64,7 +64,7 @@ unsigned long atomic_exchange_64(volatile unsigned long *addr,
 
 #endif
 
-static __attribute__((always_inline))
+static inline __attribute__((always_inline))
 unsigned long _atomic_exchange(volatile void *addr, unsigned long val, int len)
 {
        switch (len) {
@@ -81,8 +81,9 @@ unsigned long _atomic_exchange(volatile void *addr, unsigned long val, int len)
        return 0;
 }
 
-#define xchg(addr, v)  (__typeof__(*(addr))) _atomic_exchange((addr), (v), \
-                                                              sizeof(*(addr)))
+#define xchg(addr, v)                                                  \
+       (__typeof__(*(addr))) _atomic_exchange((addr), (unsigned long)(v), \
+                                              sizeof(*(addr)))
 
 #endif /* #ifndef _INCLUDE_API_H */
 
This page took 0.024964 seconds and 4 git commands to generate.