Skip to content

Commit ee4c159

Browse files
tititiou36KAGA-KOKO
authored andcommitted
irqchip/gic-v3-its: Remove usage of the deprecated ida_simple_xx() API
ida_alloc() and ida_free() should be used instead of the deprecated ida_simple_get() and ida_simple_remove(). The upper limit of ida_simple_get() is exclusive, but the one of ida_alloc_max() is inclusive. Adjust the code accordingly. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/3b472b0e7edf6e483b8b255cf8d1cb0163532adf.1705222332.git.christophe.jaillet@wanadoo.fr
1 parent e955a71 commit ee4c159

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/irqchip/irq-gic-v3-its.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4419,12 +4419,12 @@ static const struct irq_domain_ops its_sgi_domain_ops = {
44194419

44204420
static int its_vpe_id_alloc(void)
44214421
{
4422-
return ida_simple_get(&its_vpeid_ida, 0, ITS_MAX_VPEID, GFP_KERNEL);
4422+
return ida_alloc_max(&its_vpeid_ida, ITS_MAX_VPEID - 1, GFP_KERNEL);
44234423
}
44244424

44254425
static void its_vpe_id_free(u16 id)
44264426
{
4427-
ida_simple_remove(&its_vpeid_ida, id);
4427+
ida_free(&its_vpeid_ida, id);
44284428
}
44294429

44304430
static int its_vpe_init(struct its_vpe *vpe)

0 commit comments

Comments
 (0)