* [PATCH] remoteproc: Directly use ida_alloc()/free()
@ 2022-05-27 7:38 keliu
2022-07-18 22:59 ` (subset) " Bjorn Andersson
0 siblings, 1 reply; 2+ messages in thread
From: keliu @ 2022-05-27 7:38 UTC (permalink / raw)
To: bjorn.andersson, mathieu.poirier, linux-remoteproc, linux-kernel; +Cc: keliu
Use ida_alloc()/ida_free() instead of deprecated
ida_simple_get()/ida_simple_remove() .
Signed-off-by: keliu <liuke94@huawei.com>
---
drivers/remoteproc/remoteproc_core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index c510125769b9..c872152f4cb7 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -2427,7 +2427,7 @@ static void rproc_type_release(struct device *dev)
idr_destroy(&rproc->notifyids);
if (rproc->index >= 0)
- ida_simple_remove(&rproc_dev_index, rproc->index);
+ ida_free(&rproc_dev_index, rproc->index);
kfree_const(rproc->firmware);
kfree_const(rproc->name);
@@ -2544,9 +2544,9 @@ struct rproc *rproc_alloc(struct device *dev, const char *name,
goto put_device;
/* Assign a unique device index and name */
- rproc->index = ida_simple_get(&rproc_dev_index, 0, 0, GFP_KERNEL);
+ rproc->index = ida_alloc(&rproc_dev_index, GFP_KERNEL);
if (rproc->index < 0) {
- dev_err(dev, "ida_simple_get failed: %d\n", rproc->index);
+ dev_err(dev, "ida_alloc failed: %d\n", rproc->index);
goto put_device;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: (subset) [PATCH] remoteproc: Directly use ida_alloc()/free()
2022-05-27 7:38 [PATCH] remoteproc: Directly use ida_alloc()/free() keliu
@ 2022-07-18 22:59 ` Bjorn Andersson
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Andersson @ 2022-07-18 22:59 UTC (permalink / raw)
To: linux-remoteproc, linux-kernel, mathieu.poirier, liuke94
On Fri, 27 May 2022 07:38:32 +0000, keliu wrote:
> Use ida_alloc()/ida_free() instead of deprecated
> ida_simple_get()/ida_simple_remove() .
>
>
Applied, thanks!
[1/1] remoteproc: Directly use ida_alloc()/free()
commit: 4953012caed20e3d341085a726b97a160d8847fd
Best regards,
--
Bjorn Andersson <bjorn.andersson@linaro.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-18 22:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-27 7:38 [PATCH] remoteproc: Directly use ida_alloc()/free() keliu
2022-07-18 22:59 ` (subset) " Bjorn Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).