Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp3234921rdd; Sun, 14 Jan 2024 01:00:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IFHzybWttyGtv7GmcrRcf2scCyRgqQDYQMNfOFfLiduKso6LWq2nujs3pyt59TI0IeHOBJQ X-Received: by 2002:ac8:5bd2:0:b0:429:bb77:39a6 with SMTP id b18-20020ac85bd2000000b00429bb7739a6mr5600454qtb.94.1705222840658; Sun, 14 Jan 2024 01:00:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705222840; cv=none; d=google.com; s=arc-20160816; b=Lqj8zalRAGmAxZUYdcQn1ub0ZtaMB+hKBbQpVrewaaCrdOb9SAaPsXawLq0V4ELCqM 7ZgBK0QZgDUDUsKfKEbu2T1E8ozQzO9obGrviT+aT7JtPVdN+1mavhqb7nLxl+u0Xi+D ek1wejZNBlMI9QrLtXRVuo7ua5q92/G9Cv7FNBOZQwfsgbBXFY79KKiOXLnMNxPKSMGP eFg3u+qLzWD17A3yGh7s3hlWdinHptJ+3BetRpqiBBPTQIWUqxLDSlkWaLr9tOb4rNGJ 8JNKv1VMn2KAMUnhJJnMuMXefY9GKZ9uoDiZ6B2DsfvCJ9FdRPaScLMaIPJfAV3Q1Wo+ aIEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=yi38xR3jxyaNMmKPbq/ZSFZvYl79v0C2NPnhX4g7YBk=; fh=YNa7z7kh5USaG6nykghVWhbuSsk6qIck8yg7cV1VrI4=; b=jTfS2pyfpSIVNRlPOhPme7dGOo5CZd6BsFwbneum1iQoSUea5ZtFBRwkZArBajuAp6 UAIdkP92HXgkqhIOeSyyYN1YyjPmlI5Tu2iKVTi/RK6fqt8ZDacIfDKBTb6aEXWWxC7/ lQYth1bn3emPLpdTVAOREMibbHEtb2heGaiYuuL9FtXTHBatqMfeuCpIMAbcPS7qzT8M 6fRBfbo5g7S5oCh97y1GTgEyRZWKjrMH4AzXd40lHUuoy2kS78TRlQp7j0HjY4vst4h6 1VGXmZBBM9wkd7U0Teg+22tZ2O3WAz24yg2TF/oMz9WrKsBfNnr8+ZEhP8YnA+aVS90U k9Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=ssbkoVS1; spf=pass (google.com: domain of linux-kernel+bounces-25424-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25424-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j5-20020ac85f85000000b004299f3719c1si6283186qta.115.2024.01.14.01.00.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jan 2024 01:00:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25424-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=ssbkoVS1; spf=pass (google.com: domain of linux-kernel+bounces-25424-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25424-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6CD701C20C1D for ; Sun, 14 Jan 2024 09:00:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 07F911FBF; Sun, 14 Jan 2024 09:00:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="ssbkoVS1" 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 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: 8bit 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 --- 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_ops = { 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); } static void its_vpe_id_free(u16 id) { - ida_simple_remove(&its_vpeid_ida, id); + ida_free(&its_vpeid_ida, id); } static int its_vpe_init(struct its_vpe *vpe) -- 2.43.0