Re: [PATCH v2 07/12] rbtree: adjust root color in rb_insert_color() only when necessary

2012-09-07 Thread Arnaldo Carvalho de Melo
Em Fri, Aug 31, 2012 at 11:35:40AM +0300, Adrian Hunter escreveu: > AFAICS tools/perf/util/include/linux is for fixing up the > differences between kernel headers and exported kernel headers. > Hence my change: > > diff --git a/tools/perf/util/include/linux/rbtree.h > b/tools/perf/util/include/li

Re: [PATCH v2 07/12] rbtree: adjust root color in rb_insert_color() only when necessary

2012-09-06 Thread Olof Johansson
On Fri, Aug 31, 2012 at 1:39 AM, Michel Lespinasse wrote: > On Fri, Aug 31, 2012 at 1:35 AM, Adrian Hunter > wrote: >> On 31/08/12 11:15, Andrew Morton wrote: >>> On Fri, 31 Aug 2012 01:07:24 -0700 Michel Lespinasse >>> wrote: I thought Andrew had a patch rbtree-adjust-root-color-in-

Re: [PATCH v2 07/12] rbtree: adjust root color in rb_insert_color() only when necessary

2012-08-31 Thread Alexander Shishkin
Adrian Hunter writes: > On 31/08/12 11:15, Andrew Morton wrote: >> On Fri, 31 Aug 2012 01:07:24 -0700 Michel Lespinasse >> wrote: >> >>> On Fri, Aug 31, 2012 at 1:01 AM, Adrian Hunter >>> wrote: This breaks tools/perf build in linux-next: ../../lib/rbtree.c: In function 'rb_in

Re: [PATCH v2 07/12] rbtree: adjust root color in rb_insert_color() only when necessary

2012-08-31 Thread Michel Lespinasse
On Fri, Aug 31, 2012 at 1:35 AM, Adrian Hunter wrote: > On 31/08/12 11:15, Andrew Morton wrote: >> On Fri, 31 Aug 2012 01:07:24 -0700 Michel Lespinasse >> wrote: >>> I thought Andrew had a patch >>> rbtree-adjust-root-color-in-rb_insert_color-only-when-necessary-fix-perf-compilation >>> that fix

Re: [PATCH v2 07/12] rbtree: adjust root color in rb_insert_color() only when necessary

2012-08-31 Thread Adrian Hunter
On 31/08/12 11:15, Andrew Morton wrote: > On Fri, 31 Aug 2012 01:07:24 -0700 Michel Lespinasse > wrote: > >> On Fri, Aug 31, 2012 at 1:01 AM, Adrian Hunter >> wrote: >>> This breaks tools/perf build in linux-next: >>> >>> ../../lib/rbtree.c: In function 'rb_insert_color': >>> ../../lib/rbtree.

Re: [PATCH v2 07/12] rbtree: adjust root color in rb_insert_color() only when necessary

2012-08-31 Thread Andrew Morton
On Fri, 31 Aug 2012 01:07:24 -0700 Michel Lespinasse wrote: > On Fri, Aug 31, 2012 at 1:01 AM, Adrian Hunter > wrote: > > This breaks tools/perf build in linux-next: > > > > ../../lib/rbtree.c: In function 'rb_insert_color': > > ../../lib/rbtree.c:95:9: error: 'true' undeclared (first use in th

Re: [PATCH v2 07/12] rbtree: adjust root color in rb_insert_color() only when necessary

2012-08-31 Thread Michel Lespinasse
On Fri, Aug 31, 2012 at 1:01 AM, Adrian Hunter wrote: > This breaks tools/perf build in linux-next: > > ../../lib/rbtree.c: In function 'rb_insert_color': > ../../lib/rbtree.c:95:9: error: 'true' undeclared (first use in this function) > ../../lib/rbtree.c:95:9: note: each undeclared identifier is

Re: [PATCH v2 07/12] rbtree: adjust root color in rb_insert_color() only when necessary

2012-08-31 Thread Adrian Hunter
On 13/07/12 03:31, Michel Lespinasse wrote: > The root node of an rbtree must always be black. However, rb_insert_color() > only needs to maintain this invariant when it has been broken - that is, > when it exits the loop due to the current (red) node being the root. > In all other cases (exiting a

[PATCH v2 07/12] rbtree: adjust root color in rb_insert_color() only when necessary

2012-07-12 Thread Michel Lespinasse
The root node of an rbtree must always be black. However, rb_insert_color() only needs to maintain this invariant when it has been broken - that is, when it exits the loop due to the current (red) node being the root. In all other cases (exiting after tree rotations, or exiting due to an existing b