summaryrefslogtreecommitdiff
path: root/include/linux/lockdep.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-01-30 21:44:56 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2018-01-30 21:44:56 +0300
commit5e7481a25e90b661d1dbbba18be3fd3dfe12ec6f (patch)
tree9ac1884e2dd735256eb3ba5d52e60e040e407e55 /include/linux/lockdep.h
parentb8dbf73086085f1973d3ae66f709e78c077fed05 (diff)
parent05b93801a23c21a6f355f4c492c51715d6ccc96d (diff)
downloadlinux-5e7481a25e90b661d1dbbba18be3fd3dfe12ec6f.tar.xz
Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull locking updates from Ingo Molnar: "The main changes relate to making lock_is_held() et al (and external wrappers of them) work on const data types - this requires const propagation through the depths of lockdep. This removes a number of ugly type hacks the external helpers used" * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: lockdep: Convert some users to const lockdep: Make lockdep checking constant lockdep: Assign lock keys on registration
Diffstat (limited to 'include/linux/lockdep.h')
-rw-r--r--include/linux/lockdep.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 795634ee5aa5..6fc77d4dbdcd 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -337,9 +337,9 @@ extern void lock_release(struct lockdep_map *lock, int nested,
/*
* Same "read" as for lock_acquire(), except -1 means any.
*/
-extern int lock_is_held_type(struct lockdep_map *lock, int read);
+extern int lock_is_held_type(const struct lockdep_map *lock, int read);
-static inline int lock_is_held(struct lockdep_map *lock)
+static inline int lock_is_held(const struct lockdep_map *lock)
{
return lock_is_held_type(lock, -1);
}