[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1361791637-21646-1-git-send-email-james.hogan@imgtec.com>
Date: Mon, 25 Feb 2013 11:27:17 +0000
From: James Hogan <james.hogan@...tec.com>
To: <linux-kernel@...r.kernel.org>
CC: James Hogan <james.hogan@...tec.com>,
Paul Gortmaker <paul.gortmaker@...driver.com>,
David Howells <dhowells@...hat.com>
Subject: [PATCH 1/1] 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@...tec.com>
Cc: Paul Gortmaker <paul.gortmaker@...driver.com>
Cc: David Howells <dhowells@...hat.com>
---
include/linux/debug_locks.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h
index 3bd46f7..21ca773 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; \
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists