aboutsummaryrefslogtreecommitdiffstats
path: root/lib/debugobjects.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 19:55:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 19:55:13 -0400
commit00170fdd0846df7cdb5ad421d3a340440f930b8f (patch)
tree1883cfbda846cd65faed011bda54a52c1d40ecdd /lib/debugobjects.c
parentd09cc3659db494aca4b3bb2393c533fb4946b794 (diff)
parent3ff6db3287e8a5e8f5bb9529b8e1259ca6b10def (diff)
Merge branch 'akpm' (patchbomb from Andrew) into next
Merge misc updates from Andrew Morton: - a few fixes for 3.16. Cc'ed to stable so they'll get there somehow. - various misc fixes and cleanups - most of the ocfs2 queue. Review is slow... - most of MM. The MM queue is pretty huge this time, but not much in the way of feature work. - some tweaks under kernel/ - printk maintenance work - updates to lib/ - checkpatch updates - tweaks to init/ * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (276 commits) fs/autofs4/dev-ioctl.c: add __init to autofs_dev_ioctl_init fs/ncpfs/getopt.c: replace simple_strtoul by kstrtoul init/main.c: remove an ifdef kthreads: kill CLONE_KERNEL, change kernel_thread(kernel_init) to avoid CLONE_SIGHAND init/main.c: add initcall_blacklist kernel parameter init/main.c: don't use pr_debug() fs/binfmt_flat.c: make old_reloc() static fs/binfmt_elf.c: fix bool assignements fs/efs: convert printk(KERN_DEBUG to pr_debug fs/efs: add pr_fmt / use __func__ fs/efs: convert printk to pr_foo() scripts/checkpatch.pl: device_initcall is not the only __initcall substitute checkpatch: check stable email address checkpatch: warn on unnecessary void function return statements checkpatch: prefer kstrto<foo> to sscanf(buf, "%<lhuidx>", &bar); checkpatch: add warning for kmalloc/kzalloc with multiply checkpatch: warn on #defines ending in semicolon checkpatch: make --strict a default for files in drivers/net and net/ checkpatch: always warn on missing blank line after variable declaration block checkpatch: fix wildcard DT compatible string checking ...
Diffstat (limited to 'lib/debugobjects.c')
-rw-r--r--lib/debugobjects.c19
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
990out: 991out:
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;
1066free: 1067free:
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}