parisc: Remove casts from atomic macros
authorBastian Blank <waldi@debian.org>
Sat, 4 Apr 2009 20:54:26 +0000 (20:54 +0000)
committerKyle McMartin <kyle@mcmartin.ca>
Fri, 3 Jul 2009 03:34:06 +0000 (03:34 +0000)
The atomic operations on parisc are defined as macros. The macros
includes casts which disallows the use of some syntax elements and
produces error like this:

net/phonet/pep.c: In function 'pipe_rcv_status':
net/phonet/pep.c:262: error: lvalue required as left operand of assignment

The patch removes this superfluous casts.

Signed-off-by: Bastian Blank <waldi@debian.org>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
arch/parisc/include/asm/atomic.h

index 7eeaff944360335c8548b0f25e1828432ea55f9b..82e9688f658c1c7a50d85303dd03fa22c9e67480 100644 (file)
@@ -222,13 +222,13 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
 
 #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
 
-#define atomic_add(i,v)        ((void)(__atomic_add_return( ((int)(i)),(v))))
-#define atomic_sub(i,v)        ((void)(__atomic_add_return(-((int)(i)),(v))))
+#define atomic_add(i,v)        ((void)(__atomic_add_return( (i),(v))))
+#define atomic_sub(i,v)        ((void)(__atomic_add_return(-(i),(v))))
 #define atomic_inc(v)  ((void)(__atomic_add_return(   1,(v))))
 #define atomic_dec(v)  ((void)(__atomic_add_return(  -1,(v))))
 
-#define atomic_add_return(i,v) (__atomic_add_return( ((int)(i)),(v)))
-#define atomic_sub_return(i,v) (__atomic_add_return(-((int)(i)),(v)))
+#define atomic_add_return(i,v) (__atomic_add_return( (i),(v)))
+#define atomic_sub_return(i,v) (__atomic_add_return(-(i),(v)))
 #define atomic_inc_return(v)   (__atomic_add_return(   1,(v)))
 #define atomic_dec_return(v)   (__atomic_add_return(  -1,(v)))