Commit-ID:  76b14436b4d98903fef723365170bedd6f28ab2c
Gitweb:     https://git.kernel.org/tip/76b14436b4d98903fef723365170bedd6f28ab2c
Author:     Thomas Gleixner <[email protected]>
AuthorDate: Thu, 25 Apr 2019 11:45:11 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Mon, 29 Apr 2019 12:37:53 +0200

lockdep: Remove save argument from check_prev_add()

There is only one caller which hands in save_trace as function pointer.

Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Josh Poimboeuf <[email protected]>
Acked-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: [email protected]
Cc: David Rientjes <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Dmitry Vyukov <[email protected]>
Cc: Andrey Ryabinin <[email protected]>
Cc: [email protected]
Cc: Mike Rapoport <[email protected]>
Cc: Akinobu Mita <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: [email protected]
Cc: Robin Murphy <[email protected]>
Cc: Marek Szyprowski <[email protected]>
Cc: Johannes Thumshirn <[email protected]>
Cc: David Sterba <[email protected]>
Cc: Chris Mason <[email protected]>
Cc: Josef Bacik <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Mike Snitzer <[email protected]>
Cc: Alasdair Kergon <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Cc: Joonas Lahtinen <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: [email protected]
Cc: David Airlie <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Tom Zanussi <[email protected]>
Cc: Miroslav Benes <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]

---
 kernel/locking/lockdep.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index d7615d299d08..3603893d5bbd 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -2158,8 +2158,7 @@ check_deadlock(struct task_struct *curr, struct held_lock 
*next,
  */
 static int
 check_prev_add(struct task_struct *curr, struct held_lock *prev,
-              struct held_lock *next, int distance, struct stack_trace *trace,
-              int (*save)(struct stack_trace *trace))
+              struct held_lock *next, int distance, struct stack_trace *trace)
 {
        struct lock_list *uninitialized_var(target_entry);
        struct lock_list *entry;
@@ -2199,11 +2198,11 @@ check_prev_add(struct task_struct *curr, struct 
held_lock *prev,
        if (unlikely(!ret)) {
                if (!trace->entries) {
                        /*
-                        * If @save fails here, the printing might trigger
-                        * a WARN but because of the !nr_entries it should
-                        * not do bad things.
+                        * If save_trace fails here, the printing might
+                        * trigger a WARN but because of the !nr_entries it
+                        * should not do bad things.
                         */
-                       save(trace);
+                       save_trace(trace);
                }
                return print_circular_bug(&this, target_entry, next, prev);
        }
@@ -2253,7 +2252,7 @@ check_prev_add(struct task_struct *curr, struct held_lock 
*prev,
                return print_bfs_bug(ret);
 
 
-       if (!trace->entries && !save(trace))
+       if (!trace->entries && !save_trace(trace))
                return 0;
 
        /*
@@ -2318,7 +2317,8 @@ check_prevs_add(struct task_struct *curr, struct 
held_lock *next)
                 * added:
                 */
                if (hlock->read != 2 && hlock->check) {
-                       int ret = check_prev_add(curr, hlock, next, distance, 
&trace, save_trace);
+                       int ret = check_prev_add(curr, hlock, next, distance,
+                                                &trace);
                        if (!ret)
                                return 0;
 

Reply via email to