From: James Hogan Date: Tue, 26 Mar 2013 23:24:13 +0000 (+1100) Subject: debug_locks.h: make warning more verbose X-Git-Tag: next-20130404~3^2~474 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=51e57605ab1e99dcdfb2fdf7e71ab4be6d93ba8e;p=karo-tx-linux.git debug_locks.h: make warning more verbose The WARN_ON(1) in DEBUG_LOCKS_WARN_ON is surprisingly awkward to track down when it's hit, as it's usually buried in macros, causing multiple instances to land on the same line number. This patch makes it more useful by switching to: WARN(1, "DEBUG_LOCKS_WARN_ON(%s)", #c); so that the particular DEBUG_LOCKS_WARN_ON is more easily identified and grep'd for. For example: WARNING: at kernel/mutex.c:198 _mutex_lock_nested+0x31c/0x380() DEBUG_LOCKS_WARN_ON(l->magic != l) Signed-off-by: James Hogan Cc: Paul Gortmaker Cc: David Howells Cc: Ingo Molnar Signed-off-by: Andrew Morton --- diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h index 3bd46f766751..21ca773f77bf 100644 --- a/include/linux/debug_locks.h +++ b/include/linux/debug_locks.h @@ -27,7 +27,7 @@ extern int debug_locks_off(void); \ if (!oops_in_progress && unlikely(c)) { \ if (debug_locks_off() && !debug_locks_silent) \ - WARN_ON(1); \ + WARN(1, "DEBUG_LOCKS_WARN_ON(%s)", #c); \ __ret = 1; \ } \ __ret; \