linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: linux-kernel@vger.kernel.org
Cc: Rusty Russell <rusty@rustcorp.com.au>, Andrew Morton <akpm@osdl.org>
Subject: [PATCH] bitop - fix test_and_change_bit comment
Date: Tue, 6 Apr 2004 18:14:28 -0700	[thread overview]
Message-ID: <20040406181428.2d061035.pj@sgi.com> (raw)

Rusty, Andrew,

Is there a place in the world for this patch?  I normally don't mess
with comment fixes except as part of bigger stuff.  But someone could
stub their little toe on this one.

If you prefer, I'd be happy to bury this fix in with the cpumask
and bitmap stuff I'm cooking up.

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.

===================================================================
--- 2.6.5.orig/include/asm-cris/bitops.h	2004-04-06 17:30:54.000000000 -0700
+++ 2.6.5/include/asm-cris/bitops.h	2004-04-06 17:31:37.000000000 -0700
@@ -169,7 +169,7 @@
 	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
  *
===================================================================
--- 2.6.5.orig/include/asm-i386/bitops.h	2004-04-06 17:30:54.000000000 -0700
+++ 2.6.5/include/asm-i386/bitops.h	2004-04-06 17:31:41.000000000 -0700
@@ -212,7 +212,7 @@
 }
 
 /**
- * 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.6.5.orig/include/asm-ia64/bitops.h	2004-04-06 17:30:55.000000000 -0700
+++ 2.6.5/include/asm-ia64/bitops.h	2004-04-06 17:31:45.000000000 -0700
@@ -236,7 +236,7 @@
 }
 
 /**
- * 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
  *
===================================================================
--- 2.6.5.orig/include/asm-mips/bitops.h	2004-04-06 17:30:55.000000000 -0700
+++ 2.6.5/include/asm-mips/bitops.h	2004-04-06 17:38:45.000000000 -0700
@@ -296,7 +296,7 @@
 }
 
 /*
- * 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 @@
 }
 
 /*
- * 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.6.5.orig/include/asm-x86_64/bitops.h	2004-04-06 17:30:55.000000000 -0700
+++ 2.6.5/include/asm-x86_64/bitops.h	2004-04-06 17:39:14.000000000 -0700
@@ -204,7 +204,7 @@
 }
 
 /**
- * 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
  *

-- 
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <pj@sgi.com> 1.650.933.1373

                 reply	other threads:[~2004-04-07  1:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040406181428.2d061035.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).