From nobody Tue Dec 16 18:40:38 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 AA2A6C10F07 for ; Sun, 10 Dec 2023 17:17:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231843AbjLJRRK (ORCPT ); Sun, 10 Dec 2023 12:17:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229550AbjLJRRJ (ORCPT ); Sun, 10 Dec 2023 12:17:09 -0500 Received: from smtp.smtpout.orange.fr (smtp-23.smtpout.orange.fr [80.12.242.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C0D7FA for ; Sun, 10 Dec 2023 09:17:15 -0800 (PST) Received: from pop-os.home ([92.140.202.140]) by smtp.orange.fr with ESMTPA id CNQWrHujroJwrCNQXrDwLo; Sun, 10 Dec 2023 18:17:13 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1702228633; bh=aurnWtncV7Q1TSEkm/6CYQqUg0/hz67stY/BfmCeZBs=; h=From:To:Cc:Subject:Date; b=iySQgHrOimU8UrWY2H6752ATWXqMQfNcZmXjNkLTNmktMAtyBKNMFhhoMCZ/IJm50 2J8zeKjcPZXftwO4SpFc5sILyaWGXFxUIcpeUMnl9bJG44YlNeCTPm/guO1AEf53kZ f0341g9cxYGLx33XdTVeq+YIPwda8m7yffQZkFOdOfJFJ0anR3trdeekzE9ZNJot1F UYkyHs20FNDT3B+tFeytXAwUYJxfofJr45XJYIAQPfMHqeaHKeikDUS6x+XUV87R8P SA1o++NwCM86wrLtFTRd8Y1y9ieOyu+KVm5ZpIBtxdm+kdu0RDX8KOH5MXuLztKS73 xQrhEwvIxHEeQ== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 10 Dec 2023 18:17:13 +0100 X-ME-IP: 92.140.202.140 From: Christophe JAILLET To: Peter Rosin Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] mux: Remove usage of the deprecated ida_simple_xx() API Date: Sun, 10 Dec 2023 18:17:10 +0100 Message-Id: <727714bdfcd69d21e7f2a0c5c7426fcb70439b91.1702228605.git.christophe.jaillet@wanadoo.fr> 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/mux/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mux/core.c b/drivers/mux/core.c index 775816112932..78c0022697ec 100644 --- a/drivers/mux/core.c +++ b/drivers/mux/core.c @@ -64,7 +64,7 @@ static void mux_chip_release(struct device *dev) { struct mux_chip *mux_chip =3D to_mux_chip(dev); =20 - ida_simple_remove(&mux_ida, mux_chip->id); + ida_free(&mux_ida, mux_chip->id); kfree(mux_chip); } =20 @@ -111,7 +111,7 @@ struct mux_chip *mux_chip_alloc(struct device *dev, mux_chip->dev.of_node =3D dev->of_node; dev_set_drvdata(&mux_chip->dev, mux_chip); =20 - mux_chip->id =3D ida_simple_get(&mux_ida, 0, 0, GFP_KERNEL); + mux_chip->id =3D ida_alloc(&mux_ida, GFP_KERNEL); if (mux_chip->id < 0) { int err =3D mux_chip->id; =20 --=20 2.34.1