* [PATCH] radix tree: remove unused variable
@ 2023-08-11 13:10 Arnd Bergmann
2023-08-11 13:23 ` Matthew Wilcox
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2023-08-11 13:10 UTC (permalink / raw)
To: Matthew Wilcox
Cc: Arnd Bergmann, Nathan Chancellor, Nick Desaulniers, Tom Rix,
Andrew Morton, Peng Zhang, Rong Tao, linux-kernel, llvm
From: Arnd Bergmann <arnd@arndb.de>
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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
lib/radix-tree.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/radix-tree.c b/lib/radix-tree.c
index 1a31065b2036a..976b9bd02a1b5 100644
--- a/lib/radix-tree.c
+++ b/lib/radix-tree.c
@@ -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;
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] radix tree: remove unused variable
2023-08-11 13:10 [PATCH] radix tree: remove unused variable Arnd Bergmann
@ 2023-08-11 13:23 ` Matthew Wilcox
0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2023-08-11 13:23 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Arnd Bergmann, Nathan Chancellor, Nick Desaulniers, Tom Rix,
Andrew Morton, Peng Zhang, Rong Tao, linux-kernel, llvm
On Fri, Aug 11, 2023 at 03:10:13PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-11 13:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-11 13:10 [PATCH] radix tree: remove unused variable Arnd Bergmann
2023-08-11 13:23 ` Matthew Wilcox
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.