[PATCH] idr-test: ida_simple_get/remove are deprecated, so switch to ida_alloc/free.

From: zhangheng
Date: Fri Nov 22 2024 - 06:54:58 EST


Signed-off-by: zhangheng <zhangheng@xxxxxxxxxx>
---
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));

--
2.45.2