aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/lib
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-07-03 14:11:30 -0400
committerIngo Molnar <mingo@elte.hu>2009-07-03 15:15:08 -0400
commitddf9a003d32f720805ac30bcc15755e9289073de (patch)
treed0281a0f66eee98bcf05a7038d2b0f2008809550 /arch/x86/lib
parent3a8d1788b37435baf6c296f4ea8beb4fa4955f44 (diff)
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@linux-foundation.org> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: David Howells <dhowells@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Arnd Bergmann <arnd@arndb.de> LKML-Reference: <alpine.LFD.2.01.0907030942260.3210@localhost.localdomain> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r--arch/x86/lib/atomic64_32.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/lib/atomic64_32.c b/arch/x86/lib/atomic64_32.c
index a804f96e90e2..1d98c9eb6eac 100644
--- a/arch/x86/lib/atomic64_32.c
+++ b/arch/x86/lib/atomic64_32.c
@@ -175,9 +175,9 @@ EXPORT_SYMBOL(atomic64_sub);
175 */ 175 */
176int atomic64_sub_and_test(u64 delta, atomic64_t *ptr) 176int atomic64_sub_and_test(u64 delta, atomic64_t *ptr)
177{ 177{
178 u64 old_val = atomic64_sub_return(delta, ptr); 178 u64 new_val = atomic64_sub_return(delta, ptr);
179 179
180 return old_val == 0; 180 return new_val == 0;
181} 181}
182EXPORT_SYMBOL(atomic64_sub_and_test); 182EXPORT_SYMBOL(atomic64_sub_and_test);
183 183
@@ -244,8 +244,8 @@ EXPORT_SYMBOL(atomic64_inc_and_test);
244 */ 244 */
245int atomic64_add_negative(u64 delta, atomic64_t *ptr) 245int atomic64_add_negative(u64 delta, atomic64_t *ptr)
246{ 246{
247 long long old_val = atomic64_add_return(delta, ptr); 247 s64 new_val = atomic64_add_return(delta, ptr);
248 248
249 return old_val < 0; 249 return new_val < 0;
250} 250}
251EXPORT_SYMBOL(atomic64_add_negative); 251EXPORT_SYMBOL(atomic64_add_negative);