Skip to contentSkip to conversation

net: nfc: Directly use ida_alloc()/free()

PATCH Applied keliu 2 participants 2 messages May 27, 2022 – May 28, 2022

Subsystems (3)
lore
Share & tools
lore

keliu

author
#0 lore raw

PATCH 1/1 net: nfc: Directly use ida_alloc()/free()

Use ida_alloc()/ida_free() instead of deprecated
ida_simple_get()/ida_simple_remove() .

---
 net/nfc/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/nfc/core.c +2 -2
index 5b286e1e0a6f..9a1d61ac40b8 100644
@@ -975,7 +975,7 @@ static void nfc_release(struct device *d)
 			kfree(se);
 	}
 
-	ida_simple_remove(&nfc_index_ida, dev->idx);
+	ida_free(&nfc_index_ida, dev->idx);
 
 	kfree(dev);
 }
@@ -1066,7 +1066,7 @@ struct nfc_dev *nfc_allocate_device(const struct nfc_ops *ops,
 	if (!dev)
 		return NULL;
 
-	rc = ida_simple_get(&nfc_index_ida, 0, 0, GFP_KERNEL);
+	rc = ida_alloc(&nfc_index_ida, GFP_KERNEL);
 	if (rc < 0)
 		goto err_free_dev;
 	dev->idx = rc;
Signature · 1 line
2.25.1
#1 lore raw
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:

Quoted 7 lines · On Fri, 27 May 2022 06:42:25 +0000 you wrote:

Use ida_alloc()/ida_free() instead of deprecated
ida_simple_get()/ida_simple_remove() .

---
 net/nfc/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Here is the summary with links:
- net: nfc: Directly use ida_alloc()/free()

    https://git.kernel.org/netdev/net/c/911799172d2f

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html