* [PATCH] drivers: iommu: Directly use ida_alloc()/free()
@ 2022-05-27 7:03 ` keliu via iommu
0 siblings, 0 replies; 6+ messages in thread
From: keliu @ 2022-05-27 7:03 UTC (permalink / raw)
To: joro, will, iommu, 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/iommu/iommu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 857d4c2fd1a2..8d56146a0b44 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -595,7 +595,7 @@ static void iommu_group_release(struct kobject *kobj)
if (group->iommu_data_release)
group->iommu_data_release(group->iommu_data);
- ida_simple_remove(&iommu_group_ida, group->id);
+ ida_free(&iommu_group_ida, group->id);
if (group->default_domain)
iommu_domain_free(group->default_domain);
@@ -635,7 +635,7 @@ struct iommu_group *iommu_group_alloc(void)
INIT_LIST_HEAD(&group->entry);
BLOCKING_INIT_NOTIFIER_HEAD(&group->notifier);
- ret = ida_simple_get(&iommu_group_ida, 0, 0, GFP_KERNEL);
+ ret = ida_alloc(&iommu_group_ida, GFP_KERNEL);
if (ret < 0) {
kfree(group);
return ERR_PTR(ret);
@@ -645,7 +645,7 @@ struct iommu_group *iommu_group_alloc(void)
ret = kobject_init_and_add(&group->kobj, &iommu_group_ktype,
NULL, "%d", group->id);
if (ret) {
- ida_simple_remove(&iommu_group_ida, group->id);
+ ida_free(&iommu_group_ida, group->id);
kobject_put(&group->kobj);
return ERR_PTR(ret);
}
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] drivers: iommu: Directly use ida_alloc()/free()
@ 2022-05-27 7:03 ` keliu via iommu
0 siblings, 0 replies; 6+ messages in thread
From: keliu via iommu @ 2022-05-27 7:03 UTC (permalink / raw)
To: joro, will, iommu, 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/iommu/iommu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 857d4c2fd1a2..8d56146a0b44 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -595,7 +595,7 @@ static void iommu_group_release(struct kobject *kobj)
if (group->iommu_data_release)
group->iommu_data_release(group->iommu_data);
- ida_simple_remove(&iommu_group_ida, group->id);
+ ida_free(&iommu_group_ida, group->id);
if (group->default_domain)
iommu_domain_free(group->default_domain);
@@ -635,7 +635,7 @@ struct iommu_group *iommu_group_alloc(void)
INIT_LIST_HEAD(&group->entry);
BLOCKING_INIT_NOTIFIER_HEAD(&group->notifier);
- ret = ida_simple_get(&iommu_group_ida, 0, 0, GFP_KERNEL);
+ ret = ida_alloc(&iommu_group_ida, GFP_KERNEL);
if (ret < 0) {
kfree(group);
return ERR_PTR(ret);
@@ -645,7 +645,7 @@ struct iommu_group *iommu_group_alloc(void)
ret = kobject_init_and_add(&group->kobj, &iommu_group_ktype,
NULL, "%d", group->id);
if (ret) {
- ida_simple_remove(&iommu_group_ida, group->id);
+ ida_free(&iommu_group_ida, group->id);
kobject_put(&group->kobj);
return ERR_PTR(ret);
}
--
2.25.1
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers: iommu: Directly use ida_alloc()/free()
2022-05-27 7:03 ` keliu via iommu
@ 2022-05-27 14:12 ` Jason Gunthorpe via iommu
-1 siblings, 0 replies; 6+ messages in thread
From: Jason Gunthorpe @ 2022-05-27 14:12 UTC (permalink / raw)
To: keliu; +Cc: joro, will, iommu, linux-kernel
On Fri, May 27, 2022 at 07:03:07AM +0000, keliu wrote:
> Use ida_alloc()/ida_free() instead of deprecated
> ida_simple_get()/ida_simple_remove() .
>
> Signed-off-by: keliu <liuke94@huawei.com>
> ---
> drivers/iommu/iommu.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Jason
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers: iommu: Directly use ida_alloc()/free()
@ 2022-05-27 14:12 ` Jason Gunthorpe via iommu
0 siblings, 0 replies; 6+ messages in thread
From: Jason Gunthorpe via iommu @ 2022-05-27 14:12 UTC (permalink / raw)
To: keliu; +Cc: will, iommu, linux-kernel
On Fri, May 27, 2022 at 07:03:07AM +0000, keliu wrote:
> Use ida_alloc()/ida_free() instead of deprecated
> ida_simple_get()/ida_simple_remove() .
>
> Signed-off-by: keliu <liuke94@huawei.com>
> ---
> drivers/iommu/iommu.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Jason
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers: iommu: Directly use ida_alloc()/free()
2022-05-27 7:03 ` keliu via iommu
@ 2022-06-07 8:10 ` Joerg Roedel
-1 siblings, 0 replies; 6+ messages in thread
From: Joerg Roedel @ 2022-06-07 8:10 UTC (permalink / raw)
To: keliu; +Cc: will, iommu, linux-kernel
On Fri, May 27, 2022 at 07:03:07AM +0000, keliu wrote:
> Use ida_alloc()/ida_free() instead of deprecated
> ida_simple_get()/ida_simple_remove() .
>
> Signed-off-by: keliu <liuke94@huawei.com>
Please change the subject to: "iommu: Directly use ida_alloc()/free()"
to match the IOMMU tree conventions. Also include all acks and
reviewed-by tags when re-sending.
Thanks,
Joerg
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers: iommu: Directly use ida_alloc()/free()
@ 2022-06-07 8:10 ` Joerg Roedel
0 siblings, 0 replies; 6+ messages in thread
From: Joerg Roedel @ 2022-06-07 8:10 UTC (permalink / raw)
To: keliu; +Cc: iommu, will, linux-kernel
On Fri, May 27, 2022 at 07:03:07AM +0000, keliu wrote:
> Use ida_alloc()/ida_free() instead of deprecated
> ida_simple_get()/ida_simple_remove() .
>
> Signed-off-by: keliu <liuke94@huawei.com>
Please change the subject to: "iommu: Directly use ida_alloc()/free()"
to match the IOMMU tree conventions. Also include all acks and
reviewed-by tags when re-sending.
Thanks,
Joerg
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-06-07 8:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-27 7:03 [PATCH] drivers: iommu: Directly use ida_alloc()/free() keliu
2022-05-27 7:03 ` keliu via iommu
2022-05-27 14:12 ` Jason Gunthorpe
2022-05-27 14:12 ` Jason Gunthorpe via iommu
2022-06-07 8:10 ` Joerg Roedel
2022-06-07 8:10 ` Joerg Roedel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.