]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rbtree: place easiest case first in rb_erase()
authorMichel Lespinasse <walken@google.com>
Fri, 7 Sep 2012 00:23:51 +0000 (10:23 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Sep 2012 05:36:21 +0000 (15:36 +1000)
commitca6057e32d7da81a6b112d8406cd5efe7496971b
tree40710322827d340b627c64828a9adecb1ef9b131
parentfa29449adfb84d51eec47b0b160a153fc81793b0
rbtree: place easiest case first in rb_erase()

In rb_erase, move the easy case (node to erase has no more than
1 child) first. I feel the code reads easier that way.

Signed-off-by: Michel Lespinasse <walken@google.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/rbtree.c