From nobody Thu Dec 25 19:57:27 2025 Received: from smtp.smtpout.orange.fr (smtp-18.smtpout.orange.fr [80.12.242.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1541B5788A for ; Thu, 11 Jan 2024 20:32:07 +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="WZVfKSij" Received: from pop-os.home ([92.140.202.140]) by smtp.orange.fr with ESMTPA id O1iWrSNLt6p30O1iXrV0h9; Thu, 11 Jan 2024 21:32:00 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1705005120; bh=O2DYDashidxiDL9JfucZnb4Q1U6o1/c9c4N52fUOZ40=; h=From:To:Cc:Subject:Date; b=WZVfKSijE3zLkgf6h9UU5hqJimHJ1XnQOS4kF/Ve5HvnDkzSESmXeoKlmwJirdoi1 pEiPAS8bQ1ooXJUVzgWMTKwO8oX9/7lk32+kjESqsPjveyy9jdPvAQR6Vk+SqJykZx ZA1Nusw+Keo9MNMfxDSHLolo36WneHMclOjRzW1ixeIWouWCWZe7UtdbyHV1d34zDU dksFZvIFDEAaYENIFPzQGDxkbsbkT9B6sAi0AoQa2hEq2TRU1o6z4N4DukZB01KGjC EgdcDvRc0im1eP8QmbljvFL+TuN4XJu7LHvwyrEHRbFkMlSAj68oUsMs4xF+BkB2+Q pBCv46G2m95xw== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 11 Jan 2024 21:32:00 +0100 X-ME-IP: 92.140.202.140 From: Christophe JAILLET To: Russell King , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: imx: Remove usage of the deprecated ida_simple_xx() API Date: Thu, 11 Jan 2024 21:31:55 +0100 Message-Id: <5807287732785d81b9c3ef9e6a25e4f3bc2e2159.1705005016.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 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(). This is less verbose. Signed-off-by: Christophe JAILLET --- arch/arm/mach-imx/mmdc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c index 444a7eaa320c..25893d109190 100644 --- a/arch/arm/mach-imx/mmdc.c +++ b/arch/arm/mach-imx/mmdc.c @@ -452,7 +452,7 @@ static int mmdc_pmu_init(struct mmdc_pmu *pmu_mmdc, .active_events =3D 0, }; =20 - pmu_mmdc->id =3D ida_simple_get(&mmdc_ida, 0, 0, GFP_KERNEL); + pmu_mmdc->id =3D ida_alloc(&mmdc_ida, GFP_KERNEL); =20 return pmu_mmdc->id; } @@ -461,7 +461,7 @@ static void imx_mmdc_remove(struct platform_device *pde= v) { struct mmdc_pmu *pmu_mmdc =3D platform_get_drvdata(pdev); =20 - ida_simple_remove(&mmdc_ida, pmu_mmdc->id); + ida_free(&mmdc_ida, pmu_mmdc->id); cpuhp_state_remove_instance_nocalls(cpuhp_mmdc_state, &pmu_mmdc->node); perf_pmu_unregister(&pmu_mmdc->pmu); iounmap(pmu_mmdc->mmdc_base); @@ -529,7 +529,7 @@ static int imx_mmdc_perf_init(struct platform_device *p= dev, void __iomem *mmdc_b cpuhp_state_remove_instance_nocalls(cpuhp_mmdc_state, &pmu_mmdc->node); hrtimer_cancel(&pmu_mmdc->hrtimer); pmu_release_id: - ida_simple_remove(&mmdc_ida, pmu_mmdc->id); + ida_free(&mmdc_ida, pmu_mmdc->id); pmu_free: kfree(pmu_mmdc); return ret; --=20 2.34.1