Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lib/radix-tree: remove unused argument of insert_entries

insert_entries() doesn't use the 'bool replace' argument, and the function
is only used locally, remove the argument.

The historical context of the unused argument is as follow:

2: commit <3a08cd52c37c79> (radix tree: Remove multiorder support)
Remove the code related to macro CONFIG_RADIX_TREE_MULTIORDER
to convert to the xArray.
Without the macro, there is no need to retain the argument.

1: commit <175542f575723e> (radix-tree: add radix_tree_join)
Add insert_entries(..., bool replace) function, depending on the
macro CONFIG_RADIX_TREE_MULTIORDER definition, the implementation
is different. Notice that the implementation without the macro doesn't
use the argument.

[Matthew Wilcox: add historical context for argument]

Link: https://lkml.kernel.org/r/20220625135324.72574-1-wuchi.zero@gmail.com
Signed-off-by: wuchi <wuchi.zero@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

wuchi and committed by
akpm
cda83bb8 045ed31e

+2 -2
+2 -2
lib/radix-tree.c
··· 677 677 } 678 678 679 679 static inline int insert_entries(struct radix_tree_node *node, 680 - void __rcu **slot, void *item, bool replace) 680 + void __rcu **slot, void *item) 681 681 { 682 682 if (*slot) 683 683 return -EEXIST; ··· 711 711 if (error) 712 712 return error; 713 713 714 - error = insert_entries(node, slot, item, false); 714 + error = insert_entries(node, slot, item); 715 715 if (error < 0) 716 716 return error; 717 717