From: Baruch Even Date: Fri, 24 Mar 2006 17:25:25 +0000 (+0100) Subject: rcu: undeclared variable used in documentation X-Git-Tag: v2.6.17-rc1~736^2~15 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de0dfcdf550e6339e9f373587da62cffb5b559f8;p=linux-2.6 rcu: undeclared variable used in documentation 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 Acked-by: Signed-off-by: Adrian Bunk --- diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt index 5ed85af887..b4ea51ad36 100644 --- a/Documentation/RCU/whatisRCU.txt +++ b/Documentation/RCU/whatisRCU.txt @@ -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;