]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rbtree: place easiest case first in rb_erase()
authorMichel Lespinasse <walken@google.com>
Fri, 28 Sep 2012 00:19:29 +0000 (10:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Oct 2012 05:03:21 +0000 (15:03 +1000)
commit4740abc909387c38860b03408e9f48df4a1efafd
tree27be1eda0c1abe8ca2299a7608c2f0d65b902fe1
parent384d41f103e8ddebce042e3d590fbe03576d1772
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