diff options
Diffstat (limited to 'lib/debugobjects.c')
| -rw-r--r-- | lib/debugobjects.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/debugobjects.c b/lib/debugobjects.c index e0731c3db706..547f7f923dbc 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 | printk(KERN_WARNING "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,11 +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 | printk(KERN_WARNING | 298 | pr_warn("object is on stack, but not annotated\n"); |
| 296 | "ODEBUG: object is on stack, but not annotated\n"); | ||
| 297 | else | 299 | else |
| 298 | printk(KERN_WARNING | 300 | pr_warn("object is not on stack, but annotated\n"); |
| 299 | "ODEBUG: object is not on stack, but annotated\n"); | ||
| 300 | WARN_ON(1); | 301 | WARN_ON(1); |
| 301 | } | 302 | } |
| 302 | 303 | ||
| @@ -985,7 +986,7 @@ static void __init debug_objects_selftest(void) | |||
| 985 | if (check_results(&obj, ODEBUG_STATE_NONE, ++fixups, ++warnings)) | 986 | if (check_results(&obj, ODEBUG_STATE_NONE, ++fixups, ++warnings)) |
| 986 | goto out; | 987 | goto out; |
| 987 | #endif | 988 | #endif |
| 988 | printk(KERN_INFO "ODEBUG: selftest passed\n"); | 989 | pr_info("selftest passed\n"); |
| 989 | 990 | ||
| 990 | out: | 991 | out: |
| 991 | debug_objects_fixups = oldfixups; | 992 | debug_objects_fixups = oldfixups; |
| @@ -1060,8 +1061,8 @@ static int __init debug_objects_replace_static_objects(void) | |||
| 1060 | } | 1061 | } |
| 1061 | local_irq_enable(); | 1062 | local_irq_enable(); |
| 1062 | 1063 | ||
| 1063 | printk(KERN_DEBUG "ODEBUG: %d of %d active objects replaced\n", cnt, | 1064 | pr_debug("%d of %d active objects replaced\n", |
| 1064 | obj_pool_used); | 1065 | cnt, obj_pool_used); |
| 1065 | return 0; | 1066 | return 0; |
| 1066 | free: | 1067 | free: |
| 1067 | hlist_for_each_entry_safe(obj, tmp, &objects, node) { | 1068 | hlist_for_each_entry_safe(obj, tmp, &objects, node) { |
| @@ -1090,7 +1091,7 @@ void __init debug_objects_mem_init(void) | |||
| 1090 | debug_objects_enabled = 0; | 1091 | debug_objects_enabled = 0; |
| 1091 | if (obj_cache) | 1092 | if (obj_cache) |
| 1092 | kmem_cache_destroy(obj_cache); | 1093 | kmem_cache_destroy(obj_cache); |
| 1093 | printk(KERN_WARNING "ODEBUG: out of memory.\n"); | 1094 | pr_warn("out of memory.\n"); |
| 1094 | } else | 1095 | } else |
| 1095 | debug_objects_selftest(); | 1096 | debug_objects_selftest(); |
| 1096 | } | 1097 | } |
