checkpatch: Mark kunmap() and kunmap_atomic() deprecated
PATCH v2 1/1 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/[email protected]
---
Changes in v2:
- Add LKML and send directly to Andy and Joe (I'm still learning b4 send...)
- Link to v1: https://lore.kernel.org/r/[email protected]
--- scripts/checkpatch.pl | 2 ++ 1 file changed, 2 insertions(+)
scripts/checkpatch.pl +2 -0
@@ -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
---
base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
change-id: 20221229-kmap-checkpatch-763cc2ace8e5
Best regards,
Signature · 1 line
Ira Weiny <[email protected]>
Quoted 7 lines · Ira Weiny
It was suggested by Fabio that
kunmap()be marked deprecated in checkpatch.[1] This did not seem necessary until an invalid conversion ofkmap_local_page()appeared in mainline.[2][3] The introduction of this bug would have been flagged withkunmap()being marked deprecated.Add
kunmap()andkunmap_atomic()to checkpatch to help prevent further confusion.
Quoted 37 lines
[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/[email protected]Cc Andy Whitcroft <[email protected]>Cc Joe Perches <[email protected]>Suggested-by "Fabio M. De Francesco" <[email protected]>Signed-off-by Ira Weiny <[email protected]>---
Changes in v2:
- Add LKML and send directly to Andy and Joe (I'm still learning b4 send...)
- Link to v1: https://lore.kernel.org/r/[email protected]--- scripts/checkpatch.pl | 2 ++ 1 file changed, 2 insertions(+)scripts/checkpatch.pl +2
-1@@ -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 ---base-commit:
1b929c02afd37871d5afb9d498426f83432e71c2
change-id: 20221229-kmap-checkpatch-763cc2ace8e5Best regards,