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>
This commit is contained in:
committed by
Linus Torvalds
parent
d7ffef289d
commit
719e484396
@@ -7,6 +7,9 @@
|
|||||||
*
|
*
|
||||||
* For licencing details see kernel-base/COPYING
|
* For licencing details see kernel-base/COPYING
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) "ODEBUG: " fmt
|
||||||
|
|
||||||
#include <linux/debugobjects.h>
|
#include <linux/debugobjects.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
@@ -218,7 +221,7 @@ static void debug_objects_oom(void)
|
|||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
pr_warn("ODEBUG: Out of memory. ODEBUG disabled\n");
|
pr_warn("Out of memory. ODEBUG disabled\n");
|
||||||
|
|
||||||
for (i = 0; i < ODEBUG_HASH_SIZE; i++, db++) {
|
for (i = 0; i < ODEBUG_HASH_SIZE; i++, db++) {
|
||||||
raw_spin_lock_irqsave(&db->lock, flags);
|
raw_spin_lock_irqsave(&db->lock, flags);
|
||||||
@@ -292,9 +295,9 @@ static void debug_object_is_on_stack(void *addr, int onstack)
|
|||||||
|
|
||||||
limit++;
|
limit++;
|
||||||
if (is_on_stack)
|
if (is_on_stack)
|
||||||
pr_warn("ODEBUG: object is on stack, but not annotated\n");
|
pr_warn("object is on stack, but not annotated\n");
|
||||||
else
|
else
|
||||||
pr_warn("ODEBUG: object is not on stack, but annotated\n");
|
pr_warn("object is not on stack, but annotated\n");
|
||||||
WARN_ON(1);
|
WARN_ON(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -983,7 +986,7 @@ static void __init debug_objects_selftest(void)
|
|||||||
if (check_results(&obj, ODEBUG_STATE_NONE, ++fixups, ++warnings))
|
if (check_results(&obj, ODEBUG_STATE_NONE, ++fixups, ++warnings))
|
||||||
goto out;
|
goto out;
|
||||||
#endif
|
#endif
|
||||||
pr_info("ODEBUG: selftest passed\n");
|
pr_info("selftest passed\n");
|
||||||
|
|
||||||
out:
|
out:
|
||||||
debug_objects_fixups = oldfixups;
|
debug_objects_fixups = oldfixups;
|
||||||
@@ -1088,7 +1091,7 @@ void __init debug_objects_mem_init(void)
|
|||||||
debug_objects_enabled = 0;
|
debug_objects_enabled = 0;
|
||||||
if (obj_cache)
|
if (obj_cache)
|
||||||
kmem_cache_destroy(obj_cache);
|
kmem_cache_destroy(obj_cache);
|
||||||
pr_warn("ODEBUG: out of memory.\n");
|
pr_warn("out of memory.\n");
|
||||||
} else
|
} else
|
||||||
debug_objects_selftest();
|
debug_objects_selftest();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user