projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8cbf0c2
)
wifi: mac80211_hwsim: Directly use ida_alloc()/free()
author
Ke Liu
<liuke94@huawei.com>
Sat, 28 May 2022 09:31:40 +0000
(09:31 +0000)
committer
Johannes Berg
<johannes.berg@intel.com>
Fri, 10 Jun 2022 14:13:01 +0000
(16:13 +0200)
Use ida_alloc()/ida_free() instead of deprecated
ida_simple_get()/ida_simple_remove().
Signed-off-by: Ke Liu <liuke94@huawei.com>
Link:
https://lore.kernel.org/r/20220528093140.1573816-1-liuke94@huawei.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/mac80211_hwsim.c
b/drivers/net/wireless/mac80211_hwsim.c
index 2f746eb645076070c17a05543069ea877a9afec1..bd408d260e9c766a54d23c02a8503bbd53158baf 100644
(file)
--- a/
drivers/net/wireless/mac80211_hwsim.c
+++ b/
drivers/net/wireless/mac80211_hwsim.c
@@
-290,8
+290,7
@@
static inline int hwsim_net_set_netgroup(struct net *net)
{
struct hwsim_net *hwsim_net = net_generic(net, hwsim_net_id);
- hwsim_net->netgroup = ida_simple_get(&hwsim_netgroup_ida,
- 0, 0, GFP_KERNEL);
+ hwsim_net->netgroup = ida_alloc(&hwsim_netgroup_ida, GFP_KERNEL);
return hwsim_net->netgroup >= 0 ? 0 : -ENOMEM;
}
@@
-4733,7
+4732,7
@@
static void __net_exit hwsim_exit_net(struct net *net)
NULL);
}
- ida_
simple_remov
e(&hwsim_netgroup_ida, hwsim_net_get_netgroup(net));
+ ida_
fre
e(&hwsim_netgroup_ida, hwsim_net_get_netgroup(net));
}
static struct pernet_operations hwsim_net_ops = {