]> git.karo-electronics.de Git - karo-tx-linux.git/commit
debug_locks.h: make warning more verbose
authorJames Hogan <james.hogan@imgtec.com>
Wed, 20 Mar 2013 04:06:59 +0000 (15:06 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 21 Mar 2013 05:28:20 +0000 (16:28 +1100)
commit9898fd53991dba76762c1687230b1e17e05671e1
tree77215c561927fbdd76186abd6629f0e95a28bf2a
parentdcffb26cd0aa5afe2250001458cf55b380cd15c2
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