Commit 0b9fc8ec authored by Yuyang Du's avatar Yuyang Du Committed by Ingo Molnar

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: default avatarYuyang Du <duyuyang@gmail.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarBart 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.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 01bb6f0a
...@@ -2230,8 +2230,7 @@ print_deadlock_bug(struct task_struct *curr, struct held_lock *prev, ...@@ -2230,8 +2230,7 @@ print_deadlock_bug(struct task_struct *curr, struct held_lock *prev,
* Returns: 0 on deadlock detected, 1 on OK, 2 on recursive read * Returns: 0 on deadlock detected, 1 on OK, 2 on recursive read
*/ */
static int static int
check_deadlock(struct task_struct *curr, struct held_lock *next, check_deadlock(struct task_struct *curr, struct held_lock *next, int read)
struct lockdep_map *next_instance, int read)
{ {
struct held_lock *prev; struct held_lock *prev;
struct held_lock *nest = NULL; struct held_lock *nest = NULL;
...@@ -2789,8 +2788,9 @@ static inline int lookup_chain_cache_add(struct task_struct *curr, ...@@ -2789,8 +2788,9 @@ static inline int lookup_chain_cache_add(struct task_struct *curr,
return 1; return 1;
} }
static int validate_chain(struct task_struct *curr, struct lockdep_map *lock, static int validate_chain(struct task_struct *curr,
struct held_lock *hlock, int chain_head, u64 chain_key) struct held_lock *hlock,
int chain_head, u64 chain_key)
{ {
/* /*
* Trylock needs to maintain the stack of held locks, but it * 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,7 +2816,7 @@ static int validate_chain(struct task_struct *curr, struct lockdep_map *lock,
* any of these scenarios could lead to a deadlock. If * any of these scenarios could lead to a deadlock. If
* All validations * All validations
*/ */
int ret = check_deadlock(curr, hlock, lock, hlock->read); int ret = check_deadlock(curr, hlock, hlock->read);
if (!ret) if (!ret)
return 0; return 0;
...@@ -2847,8 +2847,8 @@ static int validate_chain(struct task_struct *curr, struct lockdep_map *lock, ...@@ -2847,8 +2847,8 @@ static int validate_chain(struct task_struct *curr, struct lockdep_map *lock,
} }
#else #else
static inline int validate_chain(struct task_struct *curr, static inline int validate_chain(struct task_struct *curr,
struct lockdep_map *lock, struct held_lock *hlock, struct held_lock *hlock,
int chain_head, u64 chain_key) int chain_head, u64 chain_key)
{ {
return 1; return 1;
} }
...@@ -3826,7 +3826,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, ...@@ -3826,7 +3826,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
WARN_ON_ONCE(!hlock_class(hlock)->key); WARN_ON_ONCE(!hlock_class(hlock)->key);
} }
if (!validate_chain(curr, lock, hlock, chain_head, chain_key)) if (!validate_chain(curr, hlock, chain_head, chain_key))
return 0; return 0;
curr->curr_chain_key = chain_key; curr->curr_chain_key = chain_key;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment