From: Liam R. Howlett Date: Thu, 3 Jan 2019 16:42:27 +0000 (-0500) Subject: maple_tree: clean up swithc statement and remove null parent assignment X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1f290582cb8c77a2c480fab48de7ddf5370b446a;p=users%2Fjedix%2Flinux-maple.git maple_tree: clean up swithc statement and remove null parent assignment Signed-off-by: Liam R. Howlett --- diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 06465e580e31..7710b71941df 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -304,8 +304,6 @@ static void ma_root_expand(struct ma_state *ms, void *entry) } ma_append(ms, entry); - - mn->parent = NULL; /* swap the new root into the tree */ rcu_assign_pointer(ms->tree->ma_root, mt_mk_node(mn, maple_leaf_64)); } @@ -415,8 +413,6 @@ void *ma_destroy_walk(struct ma_state *mas) int i; switch (type) { - case maple_leaf_64: - break; case maple_range_64: for (i = 0; i < MAPLE_RANGE64_SLOTS; i++) { if (i > 0 && mn->mr64.pivot[i] == 0) @@ -424,6 +420,7 @@ void *ma_destroy_walk(struct ma_state *mas) ma_destroy_walk(mn->mr64.slot[i]); } break; + case maple_leaf_64: default: break; }