| Subject | Re: [PATCH v2 9/9] rbtree: remove prior augmented rbtree implementation | From | Joe Perches <> | Date | Thu, 02 Aug 2012 15:41:13 -0700 |
| |
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);
|