From nobody Tue Oct 7 05:40:50 2025 Received: from smtp.smtpout.orange.fr (smtp-72.smtpout.orange.fr [80.12.242.72]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D59623A9BE for ; Mon, 14 Jul 2025 08:18:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752481091; cv=none; b=B18E2B+K/bGrGzLOdJNCGGx51qj+I1f1S74I0BZb+/c2Eur5s5TXucFo/K0Hoa/cyH6xZl370nNhfL3zO45/n0XDxv6LujpST9X0vrLoJcaomIipuxG+yBudr6AJ1uetdxsDKAT2FbR9yUMA8t6tOigZR595qyl20PXtJcREV1g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752481091; c=relaxed/simple; bh=M+ykS1ah2gx3vm6JEaRazq13yqhSwvtDFXJ1WEiwQ3w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dDwBPD8J7uFGR52o/KF45Q8lMoset+UpVg18LU0F3q1UDC43HpQjQIt1o8TpJpWpCHm9dlTFpCEmw5TvO0BW6e6f31ijkmnUd2xhkTds10MQq7DG/l9j51Il/XPQJ0qnpCDHX9ukqRSshtjYB308bEabQFvgt22fv0FjTG4xSjo= 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=flZG0Dqm; arc=none smtp.client-ip=80.12.242.72 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="flZG0Dqm" Received: from fedora.home ([IPv6:2a01:cb10:785:b00:8347:f260:7456:7662]) by smtp.orange.fr with ESMTPA id bENfuHN2LILtwbEO1uVIhr; Mon, 14 Jul 2025 10:18:09 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1752481089; bh=SRoyxxc9lckftvVfA80h43wgqXVemUdnuvpgTZAWo7o=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=flZG0DqmobXXkShk7UcxXMb3kQSinB+K3lKz0wJrw2KzzTmM1zsf6MNEQV50Ci2yn AKPNTAR5/w/tk/yN9MAyPrzFBZu+J6KDo6mchBxET2D8YI9fHhRoBrovtdza+ouWVc AfgrNdUVAzPRmfzePpThV7XFtaFgZSCWAtx4QPsZHi+fWKDZs/lkS+sLLYzuHBrCoy sF4DXpaz0lG1TMiMUw/TTD5OzZSY+16MbxRY1sgFfqMOxEYR88mWIOb6MU+asBKHmW 1PpivOYli+YwZhoqzgdb5HhHnvknhLDr0ZClu0qtGUmMDgJ8WZPZYu5k21haMcPp6G +jYsK+rsnsqZQ== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 14 Jul 2025 10:18:09 +0200 X-ME-IP: 2a01:cb10:785:b00:8347:f260:7456:7662 From: Christophe JAILLET To: willy@infradead.org, srini@kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH v3 1/3] idr test suite: Remove usage of the deprecated ida_simple_xx() API Date: Mon, 14 Jul 2025 10:17:08 +0200 Message-ID: <2904fa2006e4fe58eea63aef87fa7f832c7804a1.1752480043.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.50.1 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 v3: - No changes v2: https://lore.kernel.org/all/715cff763aa4b2c174cc649750e14e404db6e65b.17= 22853349.git.christophe.jaillet@wanadoo.fr/ Changes in v2: - This patch was already proposed see [1]. This one also rename the functions 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.50.1 From nobody Tue Oct 7 05:40:50 2025 Received: from smtp.smtpout.orange.fr (smtp-71.smtpout.orange.fr [80.12.242.71]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB550242D62 for ; Mon, 14 Jul 2025 08:18:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.71 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752481095; cv=none; b=lpM7U5m8I9byQ68X4zyoyEVSggFvWw0CdKcN63ZurP15hlV8wkXfwVL4bhKKe3fbwnQMzNE2nD5ou83jmQDVtpo9PXY1ZCAEUCnkV4epPTCeC9d05JyQiseUJ6Uf4Q7pN9tQUnuea9lZHx/lCyoBLMdkfGqtR8zlVF3RCRvwyM4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752481095; c=relaxed/simple; bh=4UkhoCEI+OZdrHgP0Txy3tJqI9wFhRo8i5m72xMx17w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gxFjWmbLkyfxj9Nr7kJbCtNGlM2MFkZIrMVai1o6IGedoacDMzz1HomGi+y7Lo96TB3Hz9OtKfHvcD/3fPIszZxNNB1ch1jnwIUUycUwOc6OGUiX1w5yW20kd+SpenLWwo4TDPp+uOj55QCC9Lydy4nsg/GPSAQ48rU1YdzKtD8= 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=E67V9qC7; arc=none smtp.client-ip=80.12.242.71 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="E67V9qC7" Received: from fedora.home ([IPv6:2a01:cb10:785:b00:8347:f260:7456:7662]) by smtp.orange.fr with ESMTPA id bENfuHN2LILtwbEO3uVImY; Mon, 14 Jul 2025 10:18:12 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1752481092; bh=RnfKm2axSn6c9/D3xR+Q4qW13WDSptzOFVvdfV5HM1A=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=E67V9qC7Om8BeKti2vu/NHkKuTjjpJ6tRrVhkUFT61x71z8X7M89q6kneyKNf5mB0 mOMwcmmebuj6gkIjmDX0fZhh/wEc/OesCVJeXrle9UAd7m5moRFPxklwMHfs1rzTS7 oQTeK79JRQL7QRF9MxheL8nWhMpBVfTWNa/9coRM6dnfDtZFltLZIXxsjJwQOt2oUS d1X+4KtXUTvs8mEiZuB4uHCZWmrJ3W9N0+aK5AIkn4v67h9D147YQr7Or5+Y/rAslV B5hT5/+Xr92jf9NPidr6rDGnI7sxDeSJmhB+nuw2ijOFMPemKl+YkPoBw/CiU1rsm/ xAOKCcIcCwvvw== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 14 Jul 2025 10:18:12 +0200 X-ME-IP: 2a01:cb10:785:b00:8347:f260:7456:7662 From: Christophe JAILLET To: willy@infradead.org, srini@kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH v3 2/3] ida: Remove the ida_simple_xxx() API Date: Mon, 14 Jul 2025 10:17:09 +0200 Message-ID: X-Mailer: git-send-email 2.50.1 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 --- Changes in v3: - Synch with latest -next v2: https://lore.kernel.org/all/2e9b298991fb8cd47815c917a8fc069b553cea10.17= 22853349.git.christophe.jaillet@wanadoo.fr/ Changes in 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 2267902d29a7..789e23e67444 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h @@ -334,14 +334,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.50.1 From nobody Tue Oct 7 05:40:50 2025 Received: from smtp.smtpout.orange.fr (smtp-72.smtpout.orange.fr [80.12.242.72]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6254623C4EA for ; Mon, 14 Jul 2025 08:18:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752481095; cv=none; b=JOBpOrn+KQL9rY0vEJOD1AoeOS9TNbvRZaOIYGhUqt6yzgB+DPpPrOn6B7sjmpbOPFjFxME/lvNeiccNdLpq9Hwj1VelBsthtsONZgzPfk0GdYoX3Sl0MxCENQo3u8tnY5T5oQsKpELWqaWl+ymqwh7GXr7iBQUddFxEMaVv2H0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752481095; c=relaxed/simple; bh=MTkjP0sgoJwf5LDnn764LkXu/9c2IEJFkUb/5sFDdfE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ul7QjeZM5bJrDlqX+oqqWxb/UgIiASaj1jMsw7gUAFQbEq3CDKfIgTIMTkVgOICKQkZHL9uOCxQ0yviIdK5a1VB7vwm832FKMyPsnBUpicZFIHWwwDqGOAaaJObInHUt2oiuOMQICnwFr1SfPSGgNXNCrr4XsMdxa1acilsVVXs= 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=PDLqApQk; arc=none smtp.client-ip=80.12.242.72 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="PDLqApQk" Received: from fedora.home ([IPv6:2a01:cb10:785:b00:8347:f260:7456:7662]) by smtp.orange.fr with ESMTPA id bENfuHN2LILtwbEO6uVIq6; Mon, 14 Jul 2025 10:18:14 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1752481094; bh=z3kT5dZJgpTnox9ypOuVPPZtOj3DHFcBoSAL9W8ASSQ=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=PDLqApQkWB9P63Sz/bCJqYzOnru8j7BOyR3HrIvJUE2XAlzFHzeSrlulbPrv0MwSV Z+uWeMTcr8E0C2zhdrgCHoMd9ukrmUhaxqnwj5yh4TzuokSFH5yfbkJmV5SJlWRk1z 6rI0qgugFJjyaa68tJvrh8Tm7uKfWJq60gSUCyH00IjpTZmOKBgNldqE4F16Nf7ysH YznT/qPppWoPUEYCqHDQ6zHCvl5GvjchreuwpBPwvzuO4fHcy7z7NUnV5nXoNvKIGf iTcopKfEOgNBtq112iofMeGRJCyI2F6rYiglwtUlG6hNUWsfkD17DncbB3o+RY6hPQ sP44I1DCBRz9A== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 14 Jul 2025 10:18:14 +0200 X-ME-IP: 2a01:cb10:785:b00:8347:f260:7456:7662 From: Christophe JAILLET To: willy@infradead.org, srini@kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH v3 3/3] nvmem: Update a comment related to struct nvmem_config Date: Mon, 14 Jul 2025 10:17:10 +0200 Message-ID: <27a9dec93a9f79140b11a77df38b1b45bd342e09.1752480043.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.50.1 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 v3: - No changes v2: https://lore.kernel.org/all/10fd5b4afb1a43f4c4665fe4f362e671a729b37f.17= 22853349.git.christophe.jaillet@wanadoo.fr/ Changes in v2: - No changes 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 615a560d9edb..f3b13da78aac 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.50.1