]> git.baikalelectronics.ru Git - kernel.git/commit
sparse: use static inline for __chk_{user,io}_ptr()
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Fri, 28 Aug 2020 08:53:01 +0000 (10:53 +0200)
committerMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Sat, 29 Aug 2020 07:29:32 +0000 (09:29 +0200)
commit0f2743bf9f923221364d905296f56eed3276021a
tree341428ddf26259238c7af79d5817929e0adb6151
parentb4ed1670d0a7dc7faeb6ab80a6bf58c72e47296c
sparse: use static inline for __chk_{user,io}_ptr()

__chk_user_ptr() & __chk_io_ptr() are dummy extern functions which
only exist to enforce the typechecking of __user or __iomem pointers
in macros when using sparse.

This typechecking is done by inserting a call to these functions.
But the presence of these calls can inhibit some simplifications
and so influence the result of sparse's analysis of context/locking.

Fix this by changing these calls into static inline calls with
an empty body.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
include/linux/compiler_types.h