rcu: undeclared variable used in documentation
authorBaruch Even <baruch@ev-en.org>
Fri, 24 Mar 2006 17:25:25 +0000 (18:25 +0100)
committerAdrian Bunk <bunk@stusta.de>
Fri, 24 Mar 2006 17:25:25 +0000 (18:25 +0100)
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>
Acked-by: <paulmck@us.ibm.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Documentation/RCU/whatisRCU.txt

index 5ed85af88789afc46c0f1065ca701552d96cfebc..b4ea51ad3610f7c2a99f18c3ee2dc776ebfe0731 100644 (file)
@@ -360,7 +360,7 @@ uses of RCU may be found in listRCU.txt, arrayRCU.txt, and NMI-RCU.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;
@@ -461,7 +461,7 @@ The foo_update_a() function might then be written as follows:
                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;