* [PATCH] lib/radix-tree: Remove unuse argument of insert_entries
@ 2022-06-24 13:15 wuchi
2022-06-24 16:56 ` Matthew Wilcox
0 siblings, 1 reply; 2+ messages in thread
From: wuchi @ 2022-06-24 13:15 UTC (permalink / raw)
To: willy, rdunlap, akpm; +Cc: linux-kernel
Function insert_entries doesn't use the 'bool replace' argument,
and the function is only used locally, remove the argument.
Signed-off-by: wuchi <wuchi.zero@gmail.com>
---
lib/radix-tree.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/radix-tree.c b/lib/radix-tree.c
index b3afafe46fff..3c78e1e8b2ad 100644
--- a/lib/radix-tree.c
+++ b/lib/radix-tree.c
@@ -677,7 +677,7 @@ static void radix_tree_free_nodes(struct radix_tree_node *node)
}
static inline int insert_entries(struct radix_tree_node *node,
- void __rcu **slot, void *item, bool replace)
+ void __rcu **slot, void *item)
{
if (*slot)
return -EEXIST;
@@ -711,7 +711,7 @@ int radix_tree_insert(struct radix_tree_root *root, unsigned long index,
if (error)
return error;
- error = insert_entries(node, slot, item, false);
+ error = insert_entries(node, slot, item);
if (error < 0)
return error;
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] lib/radix-tree: Remove unuse argument of insert_entries
2022-06-24 13:15 [PATCH] lib/radix-tree: Remove unuse argument of insert_entries wuchi
@ 2022-06-24 16:56 ` Matthew Wilcox
0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2022-06-24 16:56 UTC (permalink / raw)
To: wuchi; +Cc: rdunlap, akpm, linux-kernel
On Fri, Jun 24, 2022 at 09:15:23PM +0800, wuchi wrote:
> Function insert_entries doesn't use the 'bool replace' argument,
> and the function is only used locally, remove the argument.
Thanks. For these kinds of patches, I like the changelog to contain the
historical context for when the code changed to make this argument unused.
Can you add that?
> Signed-off-by: wuchi <wuchi.zero@gmail.com>
> ---
> lib/radix-tree.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/radix-tree.c b/lib/radix-tree.c
> index b3afafe46fff..3c78e1e8b2ad 100644
> --- a/lib/radix-tree.c
> +++ b/lib/radix-tree.c
> @@ -677,7 +677,7 @@ static void radix_tree_free_nodes(struct radix_tree_node *node)
> }
>
> static inline int insert_entries(struct radix_tree_node *node,
> - void __rcu **slot, void *item, bool replace)
> + void __rcu **slot, void *item)
> {
> if (*slot)
> return -EEXIST;
> @@ -711,7 +711,7 @@ int radix_tree_insert(struct radix_tree_root *root, unsigned long index,
> if (error)
> return error;
>
> - error = insert_entries(node, slot, item, false);
> + error = insert_entries(node, slot, item);
> if (error < 0)
> return error;
>
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-24 16:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-24 13:15 [PATCH] lib/radix-tree: Remove unuse argument of insert_entries wuchi
2022-06-24 16:56 ` Matthew Wilcox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).