Commit 76b14436 authored by Thomas Gleixner's avatar Thomas Gleixner

lockdep: Remove save argument from check_prev_add()

There is only one caller which hands in save_trace as function pointer.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Alexander Potapenko <glider@google.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: linux-mm@kvack.org
Cc: David Rientjes <rientjes@google.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: kasan-dev@googlegroups.com
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: iommu@lists.linux-foundation.org
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Cc: David Sterba <dsterba@suse.com>
Cc: Chris Mason <clm@fb.com>
Cc: Josef Bacik <josef@toxicpanda.com>
Cc: linux-btrfs@vger.kernel.org
Cc: dm-devel@redhat.com
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: Alasdair Kergon <agk@redhat.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tom Zanussi <tom.zanussi@linux.intel.com>
Cc: Miroslav Benes <mbenes@suse.cz>
Cc: linux-arch@vger.kernel.org
Link: https://lkml.kernel.org/r/20190425094802.803362058@linutronix.de
parent b1abe462
...@@ -2158,8 +2158,7 @@ check_deadlock(struct task_struct *curr, struct held_lock *next, ...@@ -2158,8 +2158,7 @@ check_deadlock(struct task_struct *curr, struct held_lock *next,
*/ */
static int static int
check_prev_add(struct task_struct *curr, struct held_lock *prev, check_prev_add(struct task_struct *curr, struct held_lock *prev,
struct held_lock *next, int distance, struct stack_trace *trace, struct held_lock *next, int distance, struct stack_trace *trace)
int (*save)(struct stack_trace *trace))
{ {
struct lock_list *uninitialized_var(target_entry); struct lock_list *uninitialized_var(target_entry);
struct lock_list *entry; struct lock_list *entry;
...@@ -2199,11 +2198,11 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev, ...@@ -2199,11 +2198,11 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev,
if (unlikely(!ret)) { if (unlikely(!ret)) {
if (!trace->entries) { if (!trace->entries) {
/* /*
* If @save fails here, the printing might trigger * If save_trace fails here, the printing might
* a WARN but because of the !nr_entries it should * trigger a WARN but because of the !nr_entries it
* not do bad things. * should not do bad things.
*/ */
save(trace); save_trace(trace);
} }
return print_circular_bug(&this, target_entry, next, prev); return print_circular_bug(&this, target_entry, next, prev);
} }
...@@ -2253,7 +2252,7 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev, ...@@ -2253,7 +2252,7 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev,
return print_bfs_bug(ret); return print_bfs_bug(ret);
if (!trace->entries && !save(trace)) if (!trace->entries && !save_trace(trace))
return 0; return 0;
/* /*
...@@ -2318,7 +2317,8 @@ check_prevs_add(struct task_struct *curr, struct held_lock *next) ...@@ -2318,7 +2317,8 @@ check_prevs_add(struct task_struct *curr, struct held_lock *next)
* added: * added:
*/ */
if (hlock->read != 2 && hlock->check) { 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) if (!ret)
return 0; return 0;
......
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