Commit 664c100b authored by Chris Metcalf's avatar Chris Metcalf

arch/tile: fix gcc 4.6 warnings in <asm/bitops_64.h>

Fix some signedness and variable usage warnings in change_bit()
and test_and_change_bit().
Signed-off-by: default avatarChris Metcalf <cmetcalf@tilera.com>
parent 07feea87
...@@ -38,10 +38,10 @@ static inline void clear_bit(unsigned nr, volatile unsigned long *addr) ...@@ -38,10 +38,10 @@ static inline void clear_bit(unsigned nr, volatile unsigned long *addr)
static inline void change_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)); unsigned long mask = (1UL << (nr % BITS_PER_LONG));
long guess, oldval; unsigned long guess, oldval;
addr += nr / BITS_PER_LONG; addr += nr / BITS_PER_LONG;
old = *addr; oldval = *addr;
do { do {
guess = oldval; guess = oldval;
oldval = atomic64_cmpxchg((atomic64_t *)addr, oldval = atomic64_cmpxchg((atomic64_t *)addr,
...@@ -85,7 +85,7 @@ static inline int test_and_change_bit(unsigned nr, ...@@ -85,7 +85,7 @@ static inline int test_and_change_bit(unsigned nr,
volatile unsigned long *addr) volatile unsigned long *addr)
{ {
unsigned long mask = (1UL << (nr % BITS_PER_LONG)); unsigned long mask = (1UL << (nr % BITS_PER_LONG));
long guess, oldval = *addr; unsigned long guess, oldval;
addr += nr / BITS_PER_LONG; addr += nr / BITS_PER_LONG;
oldval = *addr; oldval = *addr;
do { do {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment