From nobody Fri Dec 19 19:07:40 2025 Received: from msa.smtpout.orange.fr (msa-217.smtpout.orange.fr [193.252.23.217]) (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 9FBE7155C8D for ; Mon, 5 Aug 2024 10:30:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.252.23.217 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722853805; cv=none; b=P4vzCJ5S5SacSyOig0WCutLF8df1qBV7M6uW7epUKyrySzzOUB1rt+/LD9NGBmlcjbLXUQqL6G340GGA4VzWRKn+2yWWVF/51Ist2Q1LKd24XvhiBtJwaWhjlW7emtQs5GyiaH2xpylRp/Hmv78O/UnA7/K09eKm17Gbq4hO6zg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722853805; c=relaxed/simple; bh=/cPONUnalwhAghdVZucg3m5xD23JaHM8N6fr9ohMXew=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Gcmwh2ko6vDhLJLu5EA6dWiPJz/QXpF+sB5FzP3HwHLyefma6Sq0ZUtFJ2hFxFzkX06VFQ9CbpmRBc+9b9O3iO1X4ZSLxsaZuPH0FlwylsYzIS9OcidmuecsSdBIIQ6C0CnMvP+pqDuDA77dpnXmzYHBu5CIlPbbZl09IfcYHcc= 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=giRnpPpX; arc=none smtp.client-ip=193.252.23.217 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="giRnpPpX" Received: from fedora.home ([90.11.132.44]) by smtp.orange.fr with ESMTPA id auyPsh8Id6NRTauyVsps4D; Mon, 05 Aug 2024 12:29:59 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1722853799; bh=p85YbJjmqld36aUPh9Xr2h0pVcDZA31M4MN1X79ClEQ=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=giRnpPpXwh2AaAu7Si+w1MSbHMhHx7ppsEwgMd529CpB0fOrVyBknY5Wgew8G6Phq lHjkyCyO8Ry9SSEz+RNWUy73OXezBpvu7crDWcAJZyou63jx7Kz7eziz98L/X+7j9V tuJBQWtQs0NzYAhBAXqa5nEpqU3bb9kOMGINcMn2y/Oly8AzqKoW2649u7rYkBdhar S+jwdVlCGuyaxekrarCzjKy+7V8UYgOuhRMMOxJdowv4ZoQs9GhtHD9DqlPgXHcrj8 otdC78bj55LXNQI0a3KJYzBSAoZZTT58GS0w9Dgbs9VfxbzLhN7rcAXaLCp+08vttT 3wDsizw0KSSuw== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 05 Aug 2024 12:29:59 +0200 X-ME-IP: 90.11.132.44 From: Christophe JAILLET To: willy@infradead.org, srinivas.kandagatla@linaro.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH v2 1/3] idr test suite: Remove usage of the deprecated ida_simple_xx() API Date: Mon, 5 Aug 2024 12:29:47 +0200 Message-ID: <715cff763aa4b2c174cc649750e14e404db6e65b.1722853349.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: 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(). Note that the upper limit of ida_simple_get() is exclusive, but the one of ida_alloc_range()/ida_alloc_max() is inclusive. But because of the ranges used for the tests, there is no need to adjust them. While at it remove some useless {}. Signed-off-by: Christophe JAILLET Acked-by: Matthew Wilcox (Oracle) --- Changes in v2: - This patch was already proposed see [1]. This one also rename the funct= ion used for the test: s/ida_simple_get_remove_test/ida_alloc_free_test/. I've kept the A-b tag given at that time. v1: https://lore.kernel.org/all/81f44a41b7ccceb26a802af473f931799445821a.17= 05683269.git.christophe.jaillet@wanadoo.fr/ --- tools/testing/radix-tree/idr-test.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tools/testing/radix-tree/idr-test.c b/tools/testing/radix-tree= /idr-test.c index 84b8c3c92c79..2f830ff8396c 100644 --- a/tools/testing/radix-tree/idr-test.c +++ b/tools/testing/radix-tree/idr-test.c @@ -499,19 +499,17 @@ void ida_check_random(void) goto repeat; } =20 -void ida_simple_get_remove_test(void) +void ida_alloc_free_test(void) { DEFINE_IDA(ida); unsigned long i; =20 - for (i =3D 0; i < 10000; i++) { - assert(ida_simple_get(&ida, 0, 20000, GFP_KERNEL) =3D=3D i); - } - assert(ida_simple_get(&ida, 5, 30, GFP_KERNEL) < 0); + for (i =3D 0; i < 10000; i++) + assert(ida_alloc_max(&ida, 20000, GFP_KERNEL) =3D=3D i); + assert(ida_alloc_range(&ida, 5, 30, GFP_KERNEL) < 0); =20 - for (i =3D 0; i < 10000; i++) { - ida_simple_remove(&ida, i); - } + for (i =3D 0; i < 10000; i++) + ida_free(&ida, i); assert(ida_is_empty(&ida)); =20 ida_destroy(&ida); @@ -524,7 +522,7 @@ void user_ida_checks(void) ida_check_nomem(); ida_check_conv_user(); ida_check_random(); - ida_simple_get_remove_test(); + ida_alloc_free_test(); =20 radix_tree_cpu_dead(1); } --=20 2.45.2 From nobody Fri Dec 19 19:07:40 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 AB27413CFAB for ; Mon, 5 Aug 2024 10:30:02 +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=1722853804; cv=none; b=BkMhNL5Kdm6o58K3KHZZ3ZyBPbqZMchCfgb5ixOgp6n3jiUP3b/XtVKV1PsquTNn7+JgYryy6O/RpRMtomgZ6Qt0lwPc2YwiZFtVh3TClvYd1y3athZC4sVcRxCAWy20sCDoNAq4m/4uPvUIjF8ANFEsLeNOtSLQz0ma+t+1uU8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722853804; c=relaxed/simple; bh=JuOl0jwvRacIVVmMz9i/DNsJFghR7Ps+bku/MuxJZjE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cWD24CV/uil9kkeCZZDdWceHQ4Z9RWMXlTW38M0V6k2ppaV4MA9d4LkpBJISB7GNnSYDzXE70ODP9pBH7lNlyLptRkKNJT6iSmv0tez9FGOm1J9kpvINbLu4ZxD6xLl3OGd98LTE+grV2WAbdo3GmLYCYcHIolcYCNf/5+yZ6Ts= 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=MgiUmdKh; 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="MgiUmdKh" Received: from fedora.home ([90.11.132.44]) by smtp.orange.fr with ESMTPA id auyPsh8Id6NRTauyYsps7P; Mon, 05 Aug 2024 12:30:02 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1722853802; bh=26AbValjT7Vk4kQ03bbizfA7G7UEuqTMoxXJ/fluyLM=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=MgiUmdKhCqVn+pq6mwgruZpr78Pf5qVebAde0iagP40Tb3DeJV4GToVLMrKetEvag TCao9jW44o+WgdqhEeoYSm8EzPrm8Wu7YYZ5DVKdLrRXSsBMQBe27yLLt4JdifQcsv 7oo4BUMmicd9xi5F+5JCQgM5VvDgJiSfLpCmtQHWUR1ygFCdxqVPHrDSWqRY0aAy3W oxonoC+zybeDAJoyKjoXu+gYpqwQhxMmIVOqy5HSWgNbFLXAq603sXju6Cq/EZeBVl afqQwMZLQX07/9stSc0S28tiF9hQS2zyTBUjAKaXlaLVHdw0WupHgoMBpMfUyYTAE6 wDOKYvwFBd2HA== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 05 Aug 2024 12:30:02 +0200 X-ME-IP: 90.11.132.44 From: Christophe JAILLET To: willy@infradead.org, srinivas.kandagatla@linaro.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH v2 2/3] ida: Remove the ida_simple_xxx() API Date: Mon, 5 Aug 2024 12:29:48 +0200 Message-ID: <2e9b298991fb8cd47815c917a8fc069b553cea10.1722853349.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: 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" All users of the ida_simple_xxx() have been converted. In Linux 6.11-rc2, the only callers are in tools/testing/. So it is now time to remove the definition of this old and deprecated ida_simple_get() and ida_simple_remove(). Signed-off-by: Christophe JAILLET --- v2: new patch --- include/linux/idr.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/include/linux/idr.h b/include/linux/idr.h index da5f5fa4a3a6..60216f8fc04c 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h @@ -316,14 +316,6 @@ static inline void ida_init(struct ida *ida) xa_init_flags(&ida->xa, IDA_INIT_FLAGS); } =20 -/* - * ida_simple_get() and ida_simple_remove() are deprecated. Use - * ida_alloc() and ida_free() instead respectively. - */ -#define ida_simple_get(ida, start, end, gfp) \ - ida_alloc_range(ida, start, (end) - 1, gfp) -#define ida_simple_remove(ida, id) ida_free(ida, id) - static inline bool ida_is_empty(const struct ida *ida) { return xa_empty(&ida->xa); --=20 2.45.2 From nobody Fri Dec 19 19:07:40 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 8AC3815748D for ; Mon, 5 Aug 2024 10:30:05 +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=1722853807; cv=none; b=HPZ2NczJqvdL28/tI7dPsUgaIUuwkYe9kfYZlnRbUIaHYcjYsFWI6qVvl0vnMV8iRKMlIfCzEGZ8WZb4E6qLgw/loN2m7c1wM1zS9QiGMZU9rGvP/X5cQJj4ftJLAQ32pixE/3/6iYDfGLuopqRz2vIRQ/JKghBalwCFsa2YEnE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722853807; c=relaxed/simple; bh=WM4jDsNl88icLtOhSZc2z02eEcUwms+W5Nt3XUgfBA0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=e8TC44DcRFWBJhMmwO+xrjDsYfr5NeZ7Txa3FloHI7P//60A0pgPp4tY7wZBLv2oE4c3X5YKqb8HiYSz/TH+N2JX3Cv5TDx9/lRKXtivrPRvrMEJ4L7MxWTAh7G2pDJ98Ql5QazJsIrxYMV5L51fbBMMbgxPdnqProzGWk75RhU= 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=kriIqqh2; 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="kriIqqh2" Received: from fedora.home ([90.11.132.44]) by smtp.orange.fr with ESMTPA id auyPsh8Id6NRTauybsps9S; Mon, 05 Aug 2024 12:30:05 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1722853805; bh=SUPvmmO6LqCQ5AJ+3l+Xza8HDESgMwZoQBA6LVUiG6Y=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=kriIqqh2bjejAkv2YmddnEc0Y4ilI3Oz9+o896mHu/UmgG34i37XlCUGmgJBCJKY+ 7Nx1UNUqr3mKPSgDFgAzj0KALd2FGAv9NWF16moXTKyZ24nytpJD1ZZ2yv5rieCf20 BSyRL5QCZ5i1BDZ1wwBc6XITuqwkPKziCioYcsxpHfXffY+cObAvFgYrlche/TVshv kKkgnTILIeJlvPEKTJkuDvXXovt90EOd9WLtU1qAvjgLUCRFfWK5NyPCPJIBdGnk74 d8NYE2cKJhkVFYmDemegMJnJ+AuVEzjhZnFx8m6xs4jgUZ5y2NnPJfJOcRTDTaZrVY owXjzL7fktMkA== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 05 Aug 2024 12:30:05 +0200 X-ME-IP: 90.11.132.44 From: Christophe JAILLET To: willy@infradead.org, srinivas.kandagatla@linaro.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH v2 3/3] nvmem: Update a comment related to struct nvmem_config Date: Mon, 5 Aug 2024 12:29:49 +0200 Message-ID: <10fd5b4afb1a43f4c4665fe4f362e671a729b37f.1722853349.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: 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" Update a comment to match the function used in nvmem_register(). ida_simple_get() was replaced by ida_alloc() in commit 1eb51d6a4fce ("nvmem: switch to simpler IDA interface") Signed-off-by: Christophe JAILLET --- Changes in v2: - No chnages v1: https://lore.kernel.org/all/032b8035bd1f2dcc13ffc781c8348d9fbdf9e3b2.17= 13606957.git.christophe.jaillet@wanadoo.fr/ --- include/linux/nvmem-provider.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h index 3ebeaa0ded00..9a5f262d20f5 100644 --- a/include/linux/nvmem-provider.h +++ b/include/linux/nvmem-provider.h @@ -103,7 +103,7 @@ struct nvmem_cell_info { * * Note: A default "nvmem" name will be assigned to the device if * no name is specified in its configuration. In such case "" is - * generated with ida_simple_get() and provided id field is ignored. + * generated with ida_alloc() and provided id field is ignored. * * Note: Specifying name and setting id to -1 implies a unique device * whose name is provided as-is (kept unaltered). --=20 2.45.2