[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7815334a-940f-4ce5-86e6-9bd90465bb43@wanadoo.fr>
Date: Fri, 22 Nov 2024 13:50:41 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: zhangheng <zhangheng@...inos.cn>, willy@...radead.org
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] idr-test: ida_simple_get/remove are deprecated, so switch
to ida_alloc/free.
Le 22/11/2024 à 12:54, zhangheng a écrit :
> Signed-off-by: zhangheng <zhangheng@...inos.cn>
> ---
> tools/testing/radix-tree/idr-test.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/radix-tree/idr-test.c b/tools/testing/radix-tree/idr-test.c
> index 84b8c3c92c79..7fb04a830a21 100644
> --- a/tools/testing/radix-tree/idr-test.c
> +++ b/tools/testing/radix-tree/idr-test.c
> @@ -505,12 +505,12 @@ void ida_simple_get_remove_test(void)
> unsigned long i;
>
> for (i = 0; i < 10000; i++) {
> - assert(ida_simple_get(&ida, 0, 20000, GFP_KERNEL) == i);
> + assert(ida_alloc_range(&ida, 0, 19999, GFP_KERNEL) == i);
> }
> - assert(ida_simple_get(&ida, 5, 30, GFP_KERNEL) < 0);
> + assert(ida_alloc_range(&ida, 5, 29, GFP_KERNEL) < 0);
>
> for (i = 0; i < 10000; i++) {
> - ida_simple_remove(&ida, i);
> + ida_free(&ida, i);
> }
> assert(ida_is_empty(&ida));
>
Hi,
A more complete fix for this specific file is available at [0].
please also see the serie at [1], resent at [2].
It was delayed because another usage of the API was added, and then
fixed [3].
After that, drivers/gpio/gpio-mpsse.c also re-introduced another usage.
The fix for this one was apparently never sent. This is now done. [4]
CJ
[0]:
https://lore.kernel.org/linux-kernel/715cff763aa4b2c174cc649750e14e404db6e65b.1722853349.git.christophe.jaillet@wanadoo.fr/
[1]:
https://lore.kernel.org/linux-kernel/81f44a41b7ccceb26a802af473f931799445821a.1705683269.git.christophe.jaillet@wanadoo.fr/
[2]:
https://lore.kernel.org/linux-kernel/cover.1722853349.git.christophe.jaillet@wanadoo.fr/
[3]:
https://lore.kernel.org/linux-kernel/df8bfbe2a603c596566a4f967e37d10d208bbc3f.1728507153.git.christophe.jaillet@wanadoo.fr/
[4]:
https://lore.kernel.org/linux-kernel/2ce706d3242b9d3e4b9c20c0a7d9a8afcf8897ec.1729423829.git.christophe.jaillet@wanadoo.fr/
Powered by blists - more mailing lists