From: Al Viro Date: Fri, 23 Jun 2006 09:04:09 +0000 (-0700) Subject: [PATCH] frv: NULL noise removal in frv xchg() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7f788435568795c4cd29301bb4ccf7aff54f5051;p=openwrt%2Fstaging%2Fblogic.git [PATCH] frv: NULL noise removal in frv xchg() Clean up the FRV arch's xchg() function. Signed-off-by: Al Viro Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/asm-frv/atomic.h b/include/asm-frv/atomic.h index 9a4ff03c3969..066386ac238e 100644 --- a/include/asm-frv/atomic.h +++ b/include/asm-frv/atomic.h @@ -227,7 +227,7 @@ extern unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsig break; \ \ default: \ - __xg_orig = 0; \ + __xg_orig = (__typeof__(__xg_orig))0; \ asm volatile("break"); \ break; \ } \ @@ -247,7 +247,7 @@ extern uint32_t __xchg_32(uint32_t i, volatile void *v); switch (sizeof(__xg_orig)) { \ case 4: __xg_orig = (__typeof__(*(ptr))) __xchg_32((uint32_t) x, __xg_ptr); break; \ default: \ - __xg_orig = 0; \ + __xg_orig = (__typeof__(__xg_orig))0; \ asm volatile("break"); \ break; \ } \