From: Ira Weiny Date: Thu, 29 Dec 2022 22:17:15 +0000 (-0800) Subject: checkpatch: mark kunmap() and kunmap_atomic() deprecated X-Git-Tag: v6.3-rc1~112^2~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a3ea42ff8f3c977ac568f0530d2c13a639858764;p=thirdparty%2Flinux.git checkpatch: mark kunmap() and kunmap_atomic() deprecated It was suggested by Fabio that kunmap() be marked deprecated in checkpatch.[1] This did not seem necessary until an invalid conversion of kmap_local_page() appeared in mainline.[2][3] The introduction of this bug would have been flagged with kunmap() being marked deprecated. Add kunmap() and kunmap_atomic() to checkpatch to help prevent further confusion. [1] https://lore.kernel.org/all/1884934.6tgchFWduM@suse/ [2] d406d26745ab ("cifs: skip alloc when request has no pages") [3] https://lore.kernel.org/r/20221229-cifs-kmap-v1-1-c70d0e9a53eb@intel.com Link: https://lkml.kernel.org/r/20221229-kmap-checkpatch-v2-1-919fc4d4e3c2@intel.com Signed-off-by: Ira Weiny Suggested-by: "Fabio M. De Francesco" Acked-by: Joe Perches Cc: Andy Whitcroft Signed-off-by: Andrew Morton --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 78cc595b98ce1..a6d6d7e1d0cf1 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -823,7 +823,9 @@ our %deprecated_apis = ( "get_state_synchronize_sched" => "get_state_synchronize_rcu", "cond_synchronize_sched" => "cond_synchronize_rcu", "kmap" => "kmap_local_page", + "kunmap" => "kunmap_local", "kmap_atomic" => "kmap_local_page", + "kunmap_atomic" => "kunmap_local", ); #Create a search pattern for all these strings to speed up a loop below