public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] doc/rbtree: fix inserting example
@ 2009-08-23 18:34 Marcin Slusarz
  2009-08-24 19:42 ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Marcin Slusarz @ 2009-08-23 18:34 UTC (permalink / raw)
  To: LKML; +Cc: Rob Landley, Randy Dunlap, Andrew Morton, linux-doc

rb_link_node and rb_insert_color take pointer to struct rb_node
as a first parameter, but example code passes plain struct rb_node.
Fix it.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Rob Landley <rob@landley.net>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
 Documentation/rbtree.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/rbtree.txt b/Documentation/rbtree.txt
index 7224459..b67a87e 100644
--- a/Documentation/rbtree.txt
+++ b/Documentation/rbtree.txt
@@ -131,8 +131,8 @@ Example:
   	}
 
   	/* Add new node and rebalance tree. */
-  	rb_link_node(data->node, parent, new);
-  	rb_insert_color(data->node, root);
+  	rb_link_node(&data->node, parent, new);
+  	rb_insert_color(&data->node, root);
 
 	return TRUE;
   }
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] doc/rbtree: fix inserting example
  2009-08-23 18:34 [PATCH] doc/rbtree: fix inserting example Marcin Slusarz
@ 2009-08-24 19:42 ` Randy Dunlap
  2009-08-25 17:40   ` Marcin Slusarz
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2009-08-24 19:42 UTC (permalink / raw)
  To: Marcin Slusarz; +Cc: LKML, Rob Landley, Randy Dunlap, Andrew Morton, linux-doc

On Sun, 23 Aug 2009 20:34:23 +0200 Marcin Slusarz wrote:

> rb_link_node and rb_insert_color take pointer to struct rb_node
> as a first parameter, but example code passes plain struct rb_node.
> Fix it.

This is already corrected in the mainline kernel tree, right?


> Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
> Cc: Rob Landley <rob@landley.net>
> Cc: Randy Dunlap <rdunlap@xenotime.net>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> ---
>  Documentation/rbtree.txt |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/rbtree.txt b/Documentation/rbtree.txt
> index 7224459..b67a87e 100644
> --- a/Documentation/rbtree.txt
> +++ b/Documentation/rbtree.txt
> @@ -131,8 +131,8 @@ Example:
>    	}
>  
>    	/* Add new node and rebalance tree. */
> -  	rb_link_node(data->node, parent, new);
> -  	rb_insert_color(data->node, root);
> +  	rb_link_node(&data->node, parent, new);
> +  	rb_insert_color(&data->node, root);
>  
>  	return TRUE;
>    }


---
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] doc/rbtree: fix inserting example
  2009-08-24 19:42 ` Randy Dunlap
@ 2009-08-25 17:40   ` Marcin Slusarz
  0 siblings, 0 replies; 3+ messages in thread
From: Marcin Slusarz @ 2009-08-25 17:40 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: LKML, Rob Landley, Randy Dunlap, Andrew Morton, linux-doc

Randy Dunlap wrote:
> On Sun, 23 Aug 2009 20:34:23 +0200 Marcin Slusarz wrote:
> 
>> rb_link_node and rb_insert_color take pointer to struct rb_node
>> as a first parameter, but example code passes plain struct rb_node.
>> Fix it.
> 
> This is already corrected in the mainline kernel tree, right?

yes, sorry for bothering

Marcin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-25 17:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-23 18:34 [PATCH] doc/rbtree: fix inserting example Marcin Slusarz
2009-08-24 19:42 ` Randy Dunlap
2009-08-25 17:40   ` Marcin Slusarz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox