]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rbtree: place easiest case first in rb_erase()
authorMichel Lespinasse <walken@google.com>
Fri, 21 Sep 2012 00:57:38 +0000 (10:57 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 25 Sep 2012 08:46:13 +0000 (18:46 +1000)
commit6ecbf1d71d24cbcbd2d5b7aa5e08e95076cc714f
tree7dc7d94fe154869c46b71b384c3518e288a69e4b
parent1e7aa7bc664ef372d97e47121337cb4beaef885f
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