Skip to content

Commit 5c8a010

Browse files
suryasaimadhuIngo Molnar
authored andcommitted
locking/lockdep: Fix print_collision() unused warning
Fix this: kernel/locking/lockdep.c:2051:13: warning: ‘print_collision’ defined but not used [-Wunused-function] static void print_collision(struct task_struct *curr, ^ Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1459759327-2880-1-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 9735a22 commit 5c8a010

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/locking/lockdep.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1999,6 +1999,7 @@ static inline int get_first_held_lock(struct task_struct *curr,
19991999
return ++i;
20002000
}
20012001

2002+
#ifdef CONFIG_DEBUG_LOCKDEP
20022003
/*
20032004
* Returns the next chain_key iteration
20042005
*/
@@ -2069,6 +2070,7 @@ static void print_collision(struct task_struct *curr,
20692070
printk("\nstack backtrace:\n");
20702071
dump_stack();
20712072
}
2073+
#endif
20722074

20732075
/*
20742076
* Checks whether the chain and the current held locks are consistent

0 commit comments

Comments
 (0)