Skip to contentSkip to conversation

radix tree: remove unused variable

PATCH Applied Arnd Bergmann 2 participants 2 messages Aug 11, 2023 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 radix tree: remove unused variable

From: Arnd Bergmann <[email protected]>

Recent versions of clang warn about an unused variable, though older versions saw the 'slot++' as a use and did not warn:

radix-tree.c:1136:50: error: parameter 'slot' set but not used [-Werror,-Wunused-but-set-parameter]

It's clearly not needed any more, so just remove it.

Fixes 3a08cd52c37c7 ("radix tree: Remove multiorder support")
---
 lib/radix-tree.c | 1 -
 1 file changed, 1 deletion(-)
lib/radix-tree.c +0 -1
index 1a31065b2036a..976b9bd02a1b5 100644
@@ -1136,7 +1136,6 @@ static void set_iter_tags(struct radix_tree_iter *iter,
 void __rcu **radix_tree_iter_resume(void __rcu **slot,
 					struct radix_tree_iter *iter)
 {
-	slot++;
 	iter->index = __radix_tree_iter_add(iter, 1);
 	iter->next_index = iter->index;
 	iter->tags = 0;
Signature · 1 line
2.39.2
#1 lore raw
Quoted 10 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Recent versions of clang warn about an unused variable, though older versions saw the 'slot++' as a use and did not warn:

radix-tree.c:1136:50: error: parameter 'slot' set but not used [-Werror,-Wunused-but-set-parameter]

It's clearly not needed any more, so just remove it.

Fixes 3a08cd52c37c7 ("radix tree: Remove multiorder support")

Thanks!