]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
arch/tile: fix gcc 4.6 warnings in <asm/bitops_64.h>
authorChris Metcalf <cmetcalf@tilera.com>
Tue, 27 Mar 2012 18:17:05 +0000 (14:17 -0400)
committerChris Metcalf <cmetcalf@tilera.com>
Fri, 30 Mar 2012 22:55:07 +0000 (18:55 -0400)
Fix some signedness and variable usage warnings in change_bit()
and test_and_change_bit().

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
arch/tile/include/asm/bitops_64.h

index e9c8e381ee0ee8913cf08f60e05bb6fe051c63ea..161a38193229f95aace78cc459cf3320fcc28230 100644 (file)
@@ -39,10 +39,10 @@ static inline void clear_bit(unsigned nr, volatile unsigned long *addr)
 
 static inline void change_bit(unsigned nr, volatile unsigned long *addr)
 {
-       unsigned long old, mask = (1UL << (nr % BITS_PER_LONG));
-       long guess, oldval;
+       unsigned long mask = (1UL << (nr % BITS_PER_LONG));
+       unsigned long guess, oldval;
        addr += nr / BITS_PER_LONG;
-       old = *addr;
+       oldval = *addr;
        do {
                guess = oldval;
                oldval = atomic64_cmpxchg((atomic64_t *)addr,
@@ -86,7 +86,7 @@ static inline int test_and_change_bit(unsigned nr,
                                      volatile unsigned long *addr)
 {
        unsigned long mask = (1UL << (nr % BITS_PER_LONG));
-       long guess, oldval = *addr;
+       unsigned long guess, oldval;
        addr += nr / BITS_PER_LONG;
        oldval = *addr;
        do {