Skip to content

Commit

Permalink
rcu: undeclared variable used in documentation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
baruch authored and AdrianBunk committed Mar 24, 2006
1 parent c30fe7f commit de0dfcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Documentation/RCU/whatisRCU.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit de0dfcd

Please sign in to comment.