diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-06-04 19:06:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-04 19:53:53 -0400 |
commit | 719e484396e2793f40829b98a22d55c2fcdbe74b (patch) | |
tree | dd9241bfa0377c9e2ed103d56016874f76257b56 /lib/debugobjects.c | |
parent | d7ffef289dd7332a7153e4957db78622b34d2680 (diff) |
lib/debugobjects.c: add pr_fmt to logging
Add ODEBUG: prefix to pr_fmt
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/debugobjects.c')
-rw-r--r-- | lib/debugobjects.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/debugobjects.c b/lib/debugobjects.c index ea4c7371ff94..b6282471df24 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c | |||
@@ -7,6 +7,9 @@ | |||
7 | * | 7 | * |
8 | * For licencing details see kernel-base/COPYING | 8 | * For licencing details see kernel-base/COPYING |
9 | */ | 9 | */ |
10 | |||
11 | #define pr_fmt(fmt) "ODEBUG: " fmt | ||
12 | |||
10 | #include <linux/debugobjects.h> | 13 | #include <linux/debugobjects.h> |
11 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
12 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
@@ -218,7 +221,7 @@ static void debug_objects_oom(void) | |||
218 | unsigned long flags; | 221 | unsigned long flags; |
219 | int i; | 222 | int i; |
220 | 223 | ||
221 | pr_warn("ODEBUG: Out of memory. ODEBUG disabled\n"); | 224 | pr_warn("Out of memory. ODEBUG disabled\n"); |
222 | 225 | ||
223 | for (i = 0; i < ODEBUG_HASH_SIZE; i++, db++) { | 226 | for (i = 0; i < ODEBUG_HASH_SIZE; i++, db++) { |
224 | raw_spin_lock_irqsave(&db->lock, flags); | 227 | raw_spin_lock_irqsave(&db->lock, flags); |
@@ -292,9 +295,9 @@ static void debug_object_is_on_stack(void *addr, int onstack) | |||
292 | 295 | ||
293 | limit++; | 296 | limit++; |
294 | if (is_on_stack) | 297 | if (is_on_stack) |
295 | pr_warn("ODEBUG: object is on stack, but not annotated\n"); | 298 | pr_warn("object is on stack, but not annotated\n"); |
296 | else | 299 | else |
297 | pr_warn("ODEBUG: object is not on stack, but annotated\n"); | 300 | pr_warn("object is not on stack, but annotated\n"); |
298 | WARN_ON(1); | 301 | WARN_ON(1); |
299 | } | 302 | } |
300 | 303 | ||
@@ -983,7 +986,7 @@ static void __init debug_objects_selftest(void) | |||
983 | if (check_results(&obj, ODEBUG_STATE_NONE, ++fixups, ++warnings)) | 986 | if (check_results(&obj, ODEBUG_STATE_NONE, ++fixups, ++warnings)) |
984 | goto out; | 987 | goto out; |
985 | #endif | 988 | #endif |
986 | pr_info("ODEBUG: selftest passed\n"); | 989 | pr_info("selftest passed\n"); |
987 | 990 | ||
988 | out: | 991 | out: |
989 | debug_objects_fixups = oldfixups; | 992 | debug_objects_fixups = oldfixups; |
@@ -1088,7 +1091,7 @@ void __init debug_objects_mem_init(void) | |||
1088 | debug_objects_enabled = 0; | 1091 | debug_objects_enabled = 0; |
1089 | if (obj_cache) | 1092 | if (obj_cache) |
1090 | kmem_cache_destroy(obj_cache); | 1093 | kmem_cache_destroy(obj_cache); |
1091 | pr_warn("ODEBUG: out of memory.\n"); | 1094 | pr_warn("out of memory.\n"); |
1092 | } else | 1095 | } else |
1093 | debug_objects_selftest(); | 1096 | debug_objects_selftest(); |
1094 | } | 1097 | } |