[PATCH] rbtree: increase readability of __rb_erase_augmented()

2015-08-23 Thread Wei Yang
__rb_erase_augmented() is the fundamental part of erase a node from rbtree, while to some extend it is hard to understand. This patch replaces some code with macro to make it more easy to understand for audience. 1. rb_parent(node) replaces __rb_parent(pc) 2. rb_set_parent_color() replaces direct

[PATCH] rbtree: increase readability of __rb_erase_augmented()

2015-08-23 Thread Wei Yang
__rb_erase_augmented() is the fundamental part of erase a node from rbtree, while to some extend it is hard to understand. This patch replaces some code with macro to make it more easy to understand for audience. 1. rb_parent(node) replaces __rb_parent(pc) 2. rb_set_parent_color() replaces direct