]> git.karo-electronics.de Git - karo-tx-linux.git/commit
debug_locks.h: make warning more verbose
authorJames Hogan <james.hogan@imgtec.com>
Tue, 26 Mar 2013 23:24:13 +0000 (10:24 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Apr 2013 06:04:11 +0000 (17:04 +1100)
commit51e57605ab1e99dcdfb2fdf7e71ab4be6d93ba8e
treeda5871ba73d66798698efffc5fa12d6da8100032
parent3876246f8dcaae3302fb935e884067444839ca0b
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