]> 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>
Wed, 20 Mar 2013 04:22:35 +0000 (15:22 +1100)
commit519433ec06bfbae125fbabcfbf84895563a8e372
treeb66167f6c3989c6b3c14b2b67e7df2899b2521fe
parent94d996d2e3a39d293ddfaf25b52a2f3ab247cf1f
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