]> 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>
Fri, 5 Oct 2012 04:00:57 +0000 (14:00 +1000)
commitfdb38f58cfa38cd2e9fdf37ef5cf30e8da266902
tree0101c509fcf326d0c6e24d4bc20f298deba68b43
parent60a82ad9b5d3326c477c87f1d818a833bb5e8dae
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