[<prev] [next>] [day] [month] [year] [list]
Message-Id: <201203302104.q2UL4t9E006257@farm-0012.internal.tilera.com>
Date: Tue, 27 Mar 2012 14:17:05 -0400
From: Chris Metcalf <cmetcalf@...era.com>
To: Chris Metcalf <cmetcalf@...era.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Mike Frysinger <vapier@...too.org>,
Eric Dumazet <eric.dumazet@...il.com>,
Akinobu Mita <akinobu.mita@...il.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH] 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: Chris Metcalf <cmetcalf@...era.com>
---
arch/tile/include/asm/bitops_64.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/tile/include/asm/bitops_64.h b/arch/tile/include/asm/bitops_64.h
index e9c8e38..161a381 100644
--- a/arch/tile/include/asm/bitops_64.h
+++ b/arch/tile/include/asm/bitops_64.h
@@ -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 {
--
1.6.5.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists