Skip to content

Commit

Permalink
arch/tile: fix gcc 4.6 warnings in <asm/bitops_64.h>
Browse files Browse the repository at this point in the history
Fix some signedness and variable usage warnings in change_bit()
and test_and_change_bit().

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
  • Loading branch information
Chris Metcalf committed Apr 2, 2012
1 parent 07feea8 commit 664c100
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arch/tile/include/asm/bitops_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
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,
Expand Down Expand Up @@ -85,7 +85,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 {
Expand Down

0 comments on commit 664c100

Please sign in to comment.