Skip to content

Commit

Permalink
avr32: remove unneeded cast in atomic.h
Browse files Browse the repository at this point in the history
This int cast is superfluous since system.h cmpxchg already casts it in
(typeof(*(ptr))).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
  • Loading branch information
Mathieu Desnoyers authored and Haavard Skinnemoen committed Apr 27, 2007
1 parent 0277b37 commit a4022b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/asm-avr32/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static inline int atomic_sub_if_positive(int i, atomic_t *v)
}

#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
#define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n)))
#define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n)))

#define atomic_sub(i, v) (void)atomic_sub_return(i, v)
#define atomic_add(i, v) (void)atomic_add_return(i, v)
Expand Down

0 comments on commit a4022b0

Please sign in to comment.