From nobody Thu Dec 25 17:58:40 2025 Received: from smtp.smtpout.orange.fr (smtp-23.smtpout.orange.fr [80.12.242.23]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 308D9186B for ; Sun, 14 Jan 2024 09:00:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="ssbkoVS1" Received: from fedora.home ([92.140.202.140]) by smtp.orange.fr with ESMTPA id OwEZrP7Of2jhsOwEZrsM9R; Sun, 14 Jan 2024 09:52:50 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1705222370; bh=yi38xR3jxyaNMmKPbq/ZSFZvYl79v0C2NPnhX4g7YBk=; h=From:To:Cc:Subject:Date; b=ssbkoVS1ZRNE8a3dVGCLxULy25MBTpxwBy07CDmMkeKUxMU4lGqdjnsGZr95CpCOQ Zp6BVWDeOOuVPT4gbzC0Aod4Kt99bTRE8SOIobJrnxvbRMtdKEgKtOCLGHLjhbQE4m XEOmGfFj/PK45n0AIdJA7QK9JWt8lmdxsVfbJmqLIeOny3zk8aryQgS6ACNU6iz+TG K7jvZPXs5QqUEBuyZ5jNF0PD0rN2eTgDLwcegwa4WcB7atXIn578kqYaU+2kxw5EtV 4D38/TyQv5dZ+lLlKgQHMmAwNmfKzjQ+V/k8dMnA6j+mExZcJWVv5DSe7Bo+kISc1N akRsy7qslzeng== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 14 Jan 2024 09:52:50 +0100 X-ME-IP: 92.140.202.140 From: Christophe JAILLET To: Marc Zyngier , Thomas Gleixner Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-arm-kernel@lists.infradead.org Subject: [PATCH] irqchip/gic-v3-its: Remove usage of the deprecated ida_simple_xx() API Date: Sun, 14 Jan 2024 09:52:39 +0100 Message-ID: <3b472b0e7edf6e483b8b255cf8d1cb0163532adf.1705222332.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). Note that the upper limit of ida_simple_get() is exclusive, but the one of ida_alloc_max() is inclusive. So a -1 has been added when needed. Signed-off-by: Christophe JAILLET Acked-by: Marc Zyngier --- drivers/irqchip/irq-gic-v3-its.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-= its.c index d097001c1e3e..cd950f435cf0 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -4419,12 +4419,12 @@ static const struct irq_domain_ops its_sgi_domain_o= ps =3D { =20 static int its_vpe_id_alloc(void) { - return ida_simple_get(&its_vpeid_ida, 0, ITS_MAX_VPEID, GFP_KERNEL); + return ida_alloc_max(&its_vpeid_ida, ITS_MAX_VPEID - 1, GFP_KERNEL); } =20 static void its_vpe_id_free(u16 id) { - ida_simple_remove(&its_vpeid_ida, id); + ida_free(&its_vpeid_ida, id); } =20 static int its_vpe_init(struct its_vpe *vpe) --=20 2.43.0