[PATCH] checkpatch: Add ida_simple_... functions to the deprecated_apis list

Christophe JAILLET posted 1 patch 3 years, 6 months ago
scripts/checkpatch.pl | 2 ++
1 file changed, 2 insertions(+)
[PATCH] checkpatch: Add ida_simple_... functions to the deprecated_apis list
Posted by Christophe JAILLET 3 years, 6 months ago
From include/linux/idr.h:
/*
 * ida_simple_get() and ida_simple_remove() are deprecated. Use
 * ida_alloc() and ida_free() instead respectively.
 */

So, add them to the list of deprecated functions.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 scripts/checkpatch.pl | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 88365749ed2e..9cffa6fbacec 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -813,6 +813,8 @@ our %deprecated_apis = (
 	"cond_synchronize_sched"		=> "cond_synchronize_rcu",
 	"kmap"					=> "kmap_local_page",
 	"kmap_atomic"				=> "kmap_local_page",
+	"ida_simple_get"			=> "ida_alloc(_min|_max|_range)",
+	"ida_simple_remove"			=> "ida_free",
 );
 
 #Create a search pattern for all these strings to speed up a loop below
-- 
2.34.1