From nobody Wed Dec 31 14:29:29 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01D0FC4167B for ; Wed, 1 Nov 2023 15:58:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343724AbjKAP6M (ORCPT ); Wed, 1 Nov 2023 11:58:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232682AbjKAP6K (ORCPT ); Wed, 1 Nov 2023 11:58:10 -0400 Received: from smtp.smtpout.orange.fr (smtp-14.smtpout.orange.fr [80.12.242.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20621BD for ; Wed, 1 Nov 2023 08:58:08 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id yDbZq0T7ydFbKyDbaqoC18; Wed, 01 Nov 2023 16:58:06 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1698854286; bh=i21kCUborbDIm4AbDPL2tQN3AqBRzOGB4lpH+Cd5dY8=; h=From:To:Cc:Subject:Date; b=dOSSpP4vQt0MNdHx9PyLyIAn38jj8YspPHjD2QCCUf9Uxsof8mzZ3pfM3ULTChpMu 0IjIVsFBWuzWIjTIBOIOCp/PW9+q1UKBOgNU4UTcdyhrrxRz7zD3BB9+kBk+NCtMPu mK3Re2YadiLmgBGIKlren4V71eaOizgHLuf/z2ZMKEI+m3fnoSWWoTbXYPFOUkGPT0 J+Ks83hInGhi5lEtFbAQal/dujHm6jAcqZSxpJ0+yM5Lh7CdKR1ZoaM8PPEzsuMxOM gnMYGrfHWx+H9mNmaTQ68TbutnjMeC9hDytjv3V1RbedSFaznZYXFwgLAE7LpRIqt1 2VdzsVliFMI6w== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Wed, 01 Nov 2023 16:58:06 +0100 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Vinod Koul , Kishon Vijay Abraham I Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-phy@lists.infradead.org Subject: [PATCH] phy: core: Remove usage of the deprecated ida_simple_xx() API Date: Wed, 1 Nov 2023 16:57:57 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/phy/phy-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index 96a0b1e111f3..d9be6a4d5383 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -959,7 +959,7 @@ struct phy *phy_create(struct device *dev, struct devic= e_node *node, if (!phy) return ERR_PTR(-ENOMEM); =20 - id =3D ida_simple_get(&phy_ida, 0, 0, GFP_KERNEL); + id =3D ida_alloc(&phy_ida, GFP_KERNEL); if (id < 0) { dev_err(dev, "unable to get id\n"); ret =3D id; @@ -1232,7 +1232,7 @@ static void phy_release(struct device *dev) dev_vdbg(dev, "releasing '%s'\n", dev_name(dev)); debugfs_remove_recursive(phy->debugfs); regulator_put(phy->pwr); - ida_simple_remove(&phy_ida, phy->id); + ida_free(&phy_ida, phy->id); kfree(phy); } =20 --=20 2.34.1