2006-01-31 01:00:48

by Baruch Even

[permalink] [raw]
Subject: [PATCH] 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 <[email protected]>
---

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;


2006-02-02 04:02:49

by Paul E. McKenney

[permalink] [raw]
Subject: Re: [PATCH] rcu: undeclared variable used in documentation

On Tue, Jan 31, 2006 at 03:00:43AM +0200, Baruch Even wrote:
>
> The RCU documentation uses an fp variable which is not declared in the code
> snippets. Use the new_fp variable instead.

Good catch!!!

Thanx, Paul

Acked-by: <[email protected]>
> Signed-Off-By: Baruch Even <[email protected]>
> ---
>
> 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;
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
>
>