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 <tglx@linutronix.de> Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com> Acked-by: Peter 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
This commit is contained in:
		
							parent
							
								
									b1abe4622d
								
							
						
					
					
						commit
						76b14436b4
					
				| @ -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; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user