lkml.org 
[lkml]   [2012]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 9/9] rbtree: remove prior augmented rbtree implementation
From
Date
On Thu, 2012-08-02 at 15:34 -0700, Michel Lespinasse wrote:
> convert arch/x86/mm/pat_rbtree.c to the proposed augmented rbtree api
> and remove the old augmented rbtree implementation.

style trivia:

> +static u64 compute_subtree_max_end(struct memtype *data)
> {
> - struct memtype *data;
> - u64 max_end, child_max_end;
> -
> - if (!node)
> - return;
> -
> - data = container_of(node, struct memtype, rb);
> - max_end = data->end;
> + u64 max_end = data->end, child_max_end;
>
> - child_max_end = get_subtree_max_end(node->rb_right);
> + child_max_end = get_subtree_max_end(data->rb.rb_right);

I think this reads better as:

u64 max_end = data->end;
u64 child_max_end = get_subtree_max_end(node->rb.rb_right);




\
 
 \ /
  Last update: 2012-08-03 01:21    [W:0.369 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site