Skip to content

Commit c61b3a2

Browse files
howlettakpm00
authored andcommitted
maple_tree: remove pointer to pointer use in mas_alloc_nodes()
There is a more direct and cleaner way of implementing the same functional code. Remove the confusing and unnecessary use of pointers here. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Liam R. Howlett <[email protected]> Suggested-by: Lukas Bulwahn <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent f0c4d9f commit c61b3a2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/maple_tree.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,6 @@ static inline void mas_push_node(struct ma_state *mas, struct maple_node *used)
12091209
static inline void mas_alloc_nodes(struct ma_state *mas, gfp_t gfp)
12101210
{
12111211
struct maple_alloc *node;
1212-
struct maple_alloc **nodep = &mas->alloc;
12131212
unsigned long allocated = mas_allocated(mas);
12141213
unsigned long success = allocated;
12151214
unsigned int requested = mas_alloc_req(mas);
@@ -1263,8 +1262,7 @@ static inline void mas_alloc_nodes(struct ma_state *mas, gfp_t gfp)
12631262
node->node_count--;
12641263

12651264
success += count;
1266-
nodep = &node->slot[0];
1267-
node = *nodep;
1265+
node = node->slot[0];
12681266
requested -= count;
12691267
}
12701268
mas->alloc->total = success;

0 commit comments

Comments
 (0)