[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-0054e925a298829ade45734087f7475e05c2ea1e@git.kernel.org>
Date: Fri, 3 Jul 2009 18:31:13 GMT
From: tip-bot for Ingo Molnar <mingo@...e.hu>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, acme@...hat.com, paulus@...ba.org,
hpa@...or.com, mingo@...hat.com, eric.dumazet@...il.com,
a.p.zijlstra@...llo.nl, torvalds@...ux-foundation.org,
efault@....de, arnd@...db.de, dhowells@...hat.com,
fweisbec@...il.com, akpm@...ux-foundation.org, tglx@...utronix.de,
mingo@...e.hu
Subject: [tip:perfcounters/urgent] x86: atomic64: Clean up atomic64_sub_and_test() and atomic64_add_negative()
Commit-ID: 0054e925a298829ade45734087f7475e05c2ea1e
Gitweb: http://git.kernel.org/tip/0054e925a298829ade45734087f7475e05c2ea1e
Author: Ingo Molnar <mingo@...e.hu>
AuthorDate: Fri, 3 Jul 2009 20:11:30 +0200
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Fri, 3 Jul 2009 20:23:58 +0200
x86: atomic64: Clean up atomic64_sub_and_test() and atomic64_add_negative()
Linus noticed that the variable name 'old_val' is
confusingly named in these functions - the correct
naming is 'new_val'.
Reported-by: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Eric Dumazet <eric.dumazet@...il.com>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Mike Galbraith <efault@....de>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: David Howells <dhowells@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Arnd Bergmann <arnd@...db.de>
LKML-Reference: <alpine.LFD.2.01.0907030942260.3210@...alhost.localdomain>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
arch/x86/lib/atomic64_32.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/lib/atomic64_32.c b/arch/x86/lib/atomic64_32.c
index a2dd9a9..d79f4ac 100644
--- a/arch/x86/lib/atomic64_32.c
+++ b/arch/x86/lib/atomic64_32.c
@@ -154,9 +154,9 @@ EXPORT_SYMBOL(atomic64_sub);
*/
int atomic64_sub_and_test(u64 delta, atomic64_t *ptr)
{
- u64 old_val = atomic64_sub_return(delta, ptr);
+ u64 new_val = atomic64_sub_return(delta, ptr);
- return old_val == 0;
+ return new_val == 0;
}
EXPORT_SYMBOL(atomic64_sub_and_test);
@@ -223,8 +223,8 @@ EXPORT_SYMBOL(atomic64_inc_and_test);
*/
int atomic64_add_negative(u64 delta, atomic64_t *ptr)
{
- long long old_val = atomic64_add_return(delta, ptr);
+ s64 new_val = atomic64_add_return(delta, ptr);
- return old_val < 0;
+ return new_val < 0;
}
EXPORT_SYMBOL(atomic64_add_negative);
--
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