From dbb1a307d5ba76355030e7bb4200fbef1a659539 Mon Sep 17 00:00:00 2001
From: Andrew Morton <akpm@osdl.org>
Date: Mon, 12 Apr 2004 01:01:57 -0700
Subject: [PATCH] [PATCH] fix test_and_change_bit comment

From: Paul Jackson <pj@sgi.com>

I've read over the code in each case, built and ran a test case for i386 in
particular, and studied the other uses and definitions of
test_and_change_bit().  Everything I see recommends this change.

- Fix test_and_change_bit() comment: returns old value, not new one.
---
 include/asm-cris/bitops.h   | 2 +-
 include/asm-i386/bitops.h   | 2 +-
 include/asm-ia64/bitops.h   | 2 +-
 include/asm-mips/bitops.h   | 4 ++--
 include/asm-x86_64/bitops.h | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/asm-cris/bitops.h b/include/asm-cris/bitops.h
index 10de1ccd1e01..f7401036610e 100644
--- a/include/asm-cris/bitops.h
+++ b/include/asm-cris/bitops.h
@@ -169,7 +169,7 @@ extern inline int __test_and_clear_bit(int nr, void *addr)
 	return retval;
 }
 /**
- * test_and_change_bit - Change a bit and return its new value
+ * test_and_change_bit - Change a bit and return its old value
  * @nr: Bit to change
  * @addr: Address to count from
  *
diff --git a/include/asm-i386/bitops.h b/include/asm-i386/bitops.h
index c39edc67d111..114ac7ac3680 100644
--- a/include/asm-i386/bitops.h
+++ b/include/asm-i386/bitops.h
@@ -212,7 +212,7 @@ static __inline__ int __test_and_change_bit(int nr, volatile unsigned long *addr
 }
 
 /**
- * test_and_change_bit - Change a bit and return its new value
+ * test_and_change_bit - Change a bit and return its old value
  * @nr: Bit to change
  * @addr: Address to count from
  *
diff --git a/include/asm-ia64/bitops.h b/include/asm-ia64/bitops.h
index 502f51a1a0ee..bd39859c2d2a 100644
--- a/include/asm-ia64/bitops.h
+++ b/include/asm-ia64/bitops.h
@@ -236,7 +236,7 @@ __test_and_clear_bit(int nr, volatile void * addr)
 }
 
 /**
- * test_and_change_bit - Change a bit and return its new value
+ * test_and_change_bit - Change a bit and return its old value
  * @nr: Bit to set
  * @addr: Address to count from
  *
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h
index 8a3d1a32505b..cb06e891d0aa 100644
--- a/include/asm-mips/bitops.h
+++ b/include/asm-mips/bitops.h
@@ -296,7 +296,7 @@ static inline int __test_and_clear_bit(unsigned long nr,
 }
 
 /*
- * test_and_change_bit - Change a bit and return its new value
+ * test_and_change_bit - Change a bit and return its old value
  * @nr: Bit to change
  * @addr: Address to count from
  *
@@ -567,7 +567,7 @@ static inline int __test_and_clear_bit(unsigned long nr,
 }
 
 /*
- * test_and_change_bit - Change a bit and return its new value
+ * test_and_change_bit - Change a bit and return its old value
  * @nr: Bit to change
  * @addr: Address to count from
  *
diff --git a/include/asm-x86_64/bitops.h b/include/asm-x86_64/bitops.h
index bb086405d2d4..5ce5dcef4f35 100644
--- a/include/asm-x86_64/bitops.h
+++ b/include/asm-x86_64/bitops.h
@@ -204,7 +204,7 @@ static __inline__ int __test_and_change_bit(int nr, volatile void * addr)
 }
 
 /**
- * test_and_change_bit - Change a bit and return its new value
+ * test_and_change_bit - Change a bit and return its old value
  * @nr: Bit to change
  * @addr: Address to count from
  *
-- 
2.30.9