All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Carlos López" <clopez@suse.de>
To: linux-kernel@vger.kernel.org
Cc: willy@infradead.org, "Carlos López" <clopez@suse.de>,
	"Dan Williams" <dan.j.williams@intel.com>,
	"Andy Whitcroft" <apw@canonical.com>,
	"Joe Perches" <joe@perches.com>,
	"Dwaipayan Ray" <dwaipayanray1@gmail.com>,
	"Lukas Bulwahn" <lukas.bulwahn@gmail.com>
Subject: [PATCH] checkpatch: add IDR to the deprecated list
Date: Fri, 31 Oct 2025 12:19:09 +0100	[thread overview]
Message-ID: <20251031111908.2266077-2-clopez@suse.de> (raw)

As of commit 85656ec193e9, the IDR interface is marked as deprecated
in the documentation, but no checks are made in that regard for new
code. Add the existing IDR initialization APIs to the deprecated list
in checkpatch, so that if new code is introduced using these APIs, a
warning is emitted.

Suggested-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Carlos López <clopez@suse.de>
---
 scripts/checkpatch.pl | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 92669904eecc..bc72fa66c0ef 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -860,6 +860,10 @@ our %deprecated_apis = (
 	"kunmap"				=> "kunmap_local",
 	"kmap_atomic"				=> "kmap_local_page",
 	"kunmap_atomic"				=> "kunmap_local",
+	#These should be enough to drive away new IDR users
+	"DEFINE_IDR"				=> "DEFINE_XARRAY",
+	"idr_init"				=> "xa_init",
+	"idr_init_base"				=> "xa_init_flags"
 );
 
 #Create a search pattern for all these strings to speed up a loop below
-- 
2.51.0


             reply	other threads:[~2025-10-31 11:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-31 11:19 Carlos López [this message]
2025-10-31 18:53 ` [PATCH] checkpatch: add IDR to the deprecated list dan.j.williams
2025-11-01 17:43 ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251031111908.2266077-2-clopez@suse.de \
    --to=clopez@suse.de \
    --cc=apw@canonical.com \
    --cc=dan.j.williams@intel.com \
    --cc=dwaipayanray1@gmail.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.