History

checkpatch: add IDR to the deprecated list

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.

Carlos López committed 1 year ago

Commit 464c7ea1 parent 7f37d881 file · +4 −0Browse files

Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all

Unified · Split

scripts/checkpatch.pl+4−0
@@ -860,6 +860,10 @@ our %deprecated_apis = ( · 859 unmodified lines
860860 "kunmap" => "kunmap_local",
861861 "kmap_atomic" => "kmap_local_page",
862862 "kunmap_atomic" => "kunmap_local",
863+ #These should be enough to drive away new IDR users
864+ "DEFINE_IDR" => "DEFINE_XARRAY",
865+ "idr_init" => "xa_init",
866+ "idr_init_base" => "xa_init_flags"
863867 );
864868
865869 #Create a search pattern for all these strings to speed up a loop below