1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
From: Christian Breunig <christian@breunig.cc>
Date: Sun, 3 May 2026 20:18:00 +0000
Subject: [PATCH 2/3] i40e_client: use ida_alloc and ida_free
---
src/i40e_client.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/src/i40e_client.c
+++ b/src/i40e_client.c
@@ -288,7 +288,7 @@ static void i40e_auxiliary_dev_release(struct device *dev)
struct i40e_auxiliary_device *i40e_aux_dev =
container_of(aux_dev, struct i40e_auxiliary_device, aux_dev);
- ida_simple_remove(&i40e_client_ida, aux_dev->id);
+ ida_free(&i40e_client_ida, aux_dev->id);
kfree(i40e_aux_dev);
}
@@ -311,7 +311,7 @@ static int i40e_register_auxiliary_dev(struct i40e_info *ldev, const char *name)
aux_dev->dev.release = i40e_auxiliary_dev_release;
ldev->aux_dev = aux_dev;
- ret = ida_simple_get(&i40e_client_ida, 0, 0, GFP_KERNEL);
+ ret = ida_alloc(&i40e_client_ida, GFP_KERNEL);
if (ret < 0) {
kfree(i40e_aux_dev);
return ret;
@@ -321,7 +321,7 @@ static int i40e_register_auxiliary_dev(struct i40e_info *ldev, const char *name)
ret = auxiliary_device_init(aux_dev);
if (ret < 0) {
- ida_simple_remove(&i40e_client_ida, aux_dev->id);
+ ida_free(&i40e_client_ida, aux_dev->id);
kfree(i40e_aux_dev);
return ret;
}
|