]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rbtree: place easiest case first in rb_erase()
authorMichel Lespinasse <walken@google.com>
Wed, 26 Sep 2012 01:33:34 +0000 (11:33 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 27 Sep 2012 07:26:18 +0000 (17:26 +1000)
commit8fb072602515ee7cb48e358c0b65ac184a865252
tree69a9acdd9e81b4e0bcc7337bf6d6bee2903bc894
parent499814c13c7f2d2df7d6c30df732bbbf4b048fec
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