]> git.karo-electronics.de Git - karo-tx-linux.git/commit
debug_locks.h: make warning more verbose
authorJames Hogan <james.hogan@imgtec.com>
Sun, 10 Mar 2013 10:54:38 +0000 (21:54 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 12 Mar 2013 03:56:25 +0000 (14:56 +1100)
commitd1938ab42a398232a59c3e70107a5d9cebf2a7a1
tree9677590391439f0adf2abb039c78f96bcc0b1faa
parent50361d7b4fd3508a84207bb0650b54774f2920e3
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 <james.hogan@imgtec.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/debug_locks.h