From: Joe Perches <joe@perches.com>
To: "Carlos López" <clopez@suse.de>,
linux-kernel@vger.kernel.org,
"Andrew Morton" <akpm@linux-foundation.org>
Cc: willy@infradead.org, Dan Williams <dan.j.williams@intel.com>,
Andy Whitcroft <apw@canonical.com>,
Dwaipayan Ray <dwaipayanray1@gmail.com>,
Lukas Bulwahn <lukas.bulwahn@gmail.com>
Subject: Re: [PATCH] checkpatch: add IDR to the deprecated list
Date: Sat, 01 Nov 2025 10:43:21 -0700 [thread overview]
Message-ID: <1189b6b0a67eef57f824f200121c8d46e73e5f24.camel@perches.com> (raw)
In-Reply-To: <20251031111908.2266077-2-clopez@suse.de>
On Fri, 2025-10-31 at 12:19 +0100, Carlos López wrote:
> 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
Acked-by: Joe Perches <joe@perches.com>
prev parent reply other threads:[~2025-11-01 17:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-31 11:19 Carlos López
2025-10-31 18:53 ` dan.j.williams
2025-11-01 17:43 ` Joe Perches [this message]
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=1189b6b0a67eef57f824f200121c8d46e73e5f24.camel@perches.com \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=clopez@suse.de \
--cc=dan.j.williams@intel.com \
--cc=dwaipayanray1@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®