[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1343947273.10710.4.camel@joe2Laptop>
Date: Thu, 02 Aug 2012 15:41:13 -0700
From: Joe Perches <joe@...ches.com>
To: Michel Lespinasse <walken@...gle.com>
Cc: riel@...hat.com, peterz@...radead.org, daniel.santos@...ox.com,
aarcange@...hat.com, dwmw2@...radead.org,
akpm@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org
Subject: Re: [PATCH v2 9/9] rbtree: remove prior augmented rbtree
implementation
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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists