From nobody Tue Dec 16 16:43:53 2025 Received: from msa.smtpout.orange.fr (out-70.smtpout.orange.fr [193.252.22.70]) (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 AE6C71CD06; Sun, 14 Apr 2024 10:22:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.252.22.70 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713090143; cv=none; b=nh5GVhCJvGoPp71gLRLUjxGTRFx2X3S5LlmjMeumqK9B2DFFMvWK1yBeurLbm+R+v5OTnYJtobqVKcXq2OsDjlxNArN90LtvXdXLuGjmaD8Z8naRYxa7gKrBJrstpq+3QF6fKNCrT57CMmNNPC59pCI8i421qU0EWbxJU4ebeS8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713090143; c=relaxed/simple; bh=3KjtX7RrGt+OMiORGrDzde69KGZb/8DuTUkR13Mu9uY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pL7Qwt/RMsKAT1LWhvl+Scg2PC6y+FkbMuUbijYJyqMAR2VgtvpOOjAo18DoBJu1RRH4pX8bKHQ2FGn17As56tNRH0POFXTzSpxbmrqqnwzXAq23d4R1p9mIw8QpNQgy3XLWqtKMH1PH1XDZUFwQkqEuLUyrnltGhfyt1biKlxQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=szNgOXgL; arc=none smtp.client-ip=193.252.22.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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="szNgOXgL" Received: from fedora.home ([86.243.17.157]) by smtp.orange.fr with ESMTPA id vwr1rPDFEVYR4vwr1rSj5Z; Sun, 14 Apr 2024 12:12:56 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1713089576; bh=q4WeoEWKUV095yOrt9z2s5h7VxFHEIKdZezhJpgbprM=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=szNgOXgL+vnUflzWkfBGajoO6THQTybLp1hgg7iQEv9MWMfzouYbcy76sJMe39Ssf eVRO64xLozsw1zGDD0B1wPLBsMTWjjG9sJoFtvo0jVm4tZdPVClevY44t/Dqmk9nMg 2jySCi12BZ2/Mn3StvBfMI/mtnzKissla3pGfgYLUFJTbdsfYyo1XNix84PCjGYrRy DSfZCTQpgHbZzHMwT8nCJN5hoxWmRVCZxenKVChh58ZH7kWHIJbuke5/wtwTOor7Fu HbotJ7fM3WExjJNm90p3hHmCz/onC9Kh9DIY9U6Y3KJmwDcCi+9S2wcQF5H8/4wY21 mCYx91zXAFk9w== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 14 Apr 2024 12:12:56 +0200 X-ME-IP: 86.243.17.157 From: Christophe JAILLET To: akpm@linux-foundation.org, Peter Rosin Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH RESEND] mux: Remove usage of the deprecated ida_simple_xx() API Date: Sun, 14 Apr 2024 12:12:52 +0200 Message-ID: X-Mailer: git-send-email 2.44.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(). This is less verbose. Signed-off-by: Christophe JAILLET --- This patch has been sent about 3 months ago [1]. A gentle reminder has been sent 1 month later [2]. Neither one got any reply. So, I'm adding Andrew Morton in To:, in order to help in the merge process. Context: =3D=3D=3D=3D=3D=3D=3D All patches to remove the ida_simple API have been sent. Matthew Wilcox seems happy with the on going work. (see [3]) Based on next-20240412 $git grep ida_simple_get | wc -l 25 Based on next-20240220 $git grep ida_simple_get | wc -l 36 https://elixir.bootlin.com/linux/v6.8-rc3/A/ident/ida_simple_get 50 https://elixir.bootlin.com/linux/v6.7.4/A/ident/ida_simple_get 81 Thanks CJ [1]: https://lore.kernel.org/all/727714bdfcd69d21e7f2a0c5c7426fcb70439b91.1= 702228605.git.christophe.jaillet@wanadoo.fr/ [2]: https://lore.kernel.org/all/9edc26e9-4f31-496a-969d-0edc33ef6f01@wanad= oo.fr/ [3]: https://lore.kernel.org/all/ZaqruGVz734zjxrZ@casper.infradead.org/ --- 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.44.0