summaryrefslogtreecommitdiffstats
path: root/kernel/locking/lockdep.c
diff options
context:
space:
mode:
authorYuyang Du <duyuyang@gmail.com>2019-05-06 04:19:26 -0400
committerIngo Molnar <mingo@kernel.org>2019-06-03 05:55:44 -0400
commit0b9fc8ecfa30000c8900da7adbbef23438de9ec0 (patch)
tree5f6f8e14e4035ca5d8b94e7b871afa575f8da104 /kernel/locking/lockdep.c
parent01bb6f0af992a1e6b7797d92fd31a7864872e347 (diff)
locking/lockdep: Remove unused argument in validate_chain() and check_deadlock()
The lockdep_map argument in them is not used, remove it. Signed-off-by: Yuyang Du <duyuyang@gmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-11-duyuyang@gmail.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/locking/lockdep.c')
-rw-r--r--kernel/locking/lockdep.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 3eecae315885..6cf14c84eb6d 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -2230,8 +2230,7 @@ print_deadlock_bug(struct task_struct *curr, struct held_lock *prev,
2230 * Returns: 0 on deadlock detected, 1 on OK, 2 on recursive read 2230 * Returns: 0 on deadlock detected, 1 on OK, 2 on recursive read
2231 */ 2231 */
2232static int 2232static int
2233check_deadlock(struct task_struct *curr, struct held_lock *next, 2233check_deadlock(struct task_struct *curr, struct held_lock *next, int read)
2234 struct lockdep_map *next_instance, int read)
2235{ 2234{
2236 struct held_lock *prev; 2235 struct held_lock *prev;
2237 struct held_lock *nest = NULL; 2236 struct held_lock *nest = NULL;
@@ -2789,8 +2788,9 @@ cache_hit:
2789 return 1; 2788 return 1;
2790} 2789}
2791 2790
2792static int validate_chain(struct task_struct *curr, struct lockdep_map *lock, 2791static int validate_chain(struct task_struct *curr,
2793 struct held_lock *hlock, int chain_head, u64 chain_key) 2792 struct held_lock *hlock,
2793 int chain_head, u64 chain_key)
2794{ 2794{
2795 /* 2795 /*
2796 * Trylock needs to maintain the stack of held locks, but it 2796 * Trylock needs to maintain the stack of held locks, but it
@@ -2816,7 +2816,7 @@ static int validate_chain(struct task_struct *curr, struct lockdep_map *lock,
2816 * any of these scenarios could lead to a deadlock. If 2816 * any of these scenarios could lead to a deadlock. If
2817 * All validations 2817 * All validations
2818 */ 2818 */
2819 int ret = check_deadlock(curr, hlock, lock, hlock->read); 2819 int ret = check_deadlock(curr, hlock, hlock->read);
2820 2820
2821 if (!ret) 2821 if (!ret)
2822 return 0; 2822 return 0;
@@ -2847,8 +2847,8 @@ static int validate_chain(struct task_struct *curr, struct lockdep_map *lock,
2847} 2847}
2848#else 2848#else
2849static inline int validate_chain(struct task_struct *curr, 2849static inline int validate_chain(struct task_struct *curr,
2850 struct lockdep_map *lock, struct held_lock *hlock, 2850 struct held_lock *hlock,
2851 int chain_head, u64 chain_key) 2851 int chain_head, u64 chain_key)
2852{ 2852{
2853 return 1; 2853 return 1;
2854} 2854}
@@ -3826,7 +3826,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
3826 WARN_ON_ONCE(!hlock_class(hlock)->key); 3826 WARN_ON_ONCE(!hlock_class(hlock)->key);
3827 } 3827 }
3828 3828
3829 if (!validate_chain(curr, lock, hlock, chain_head, chain_key)) 3829 if (!validate_chain(curr, hlock, chain_head, chain_key))
3830 return 0; 3830 return 0;
3831 3831
3832 curr->curr_chain_key = chain_key; 3832 curr->curr_chain_key = chain_key;