public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Baruch Even <baruch@ev-en.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org, trivial@kernel.org
Subject: [PATCH] rcu: undeclared variable used in documentation
Date: Tue, 31 Jan 2006 03:00:43 +0200	[thread overview]
Message-ID: <20060131010043.GA17021@ev-en.org> (raw)


The RCU documentation uses an fp variable which is not declared in the code
snippets. Use the new_fp variable instead.

Signed-Off-By: Baruch Even <baruch@ev-en.org>
---

 Documentation/RCU/whatisRCU.txt |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: htcp-abc/Documentation/RCU/whatisRCU.txt
===================================================================
--- htcp-abc.orig/Documentation/RCU/whatisRCU.txt
+++ htcp-abc/Documentation/RCU/whatisRCU.txt
@@ -357,7 +357,7 @@ uses of RCU may be found in listRCU.txt,
 		struct foo *new_fp;
 		struct foo *old_fp;
 
-		new_fp = kmalloc(sizeof(*fp), GFP_KERNEL);
+		new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL);
 		spin_lock(&foo_mutex);
 		old_fp = gbl_foo;
 		*new_fp = *old_fp;
@@ -456,7 +456,7 @@ The foo_update_a() function might then b
 		struct foo *new_fp;
 		struct foo *old_fp;
 
-		new_fp = kmalloc(sizeof(*fp), GFP_KERNEL);
+		new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL);
 		spin_lock(&foo_mutex);
 		old_fp = gbl_foo;
 		*new_fp = *old_fp;

             reply	other threads:[~2006-01-31  1:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-31  1:00 Baruch Even [this message]
2006-02-02  4:02 ` [PATCH] rcu: undeclared variable used in documentation Paul E. McKenney

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=20060131010043.GA17021@ev-en.org \
    --to=baruch@ev-en.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=trivial@kernel.org \
    /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