Skip to content

Commit 719e484

Browse files
Fabian Fredericktorvalds
authored andcommitted
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>
1 parent d7ffef2 commit 719e484

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

‎lib/debugobjects.c‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
*
88
* For licencing details see kernel-base/COPYING
99
*/
10+
11+
#define pr_fmt(fmt) "ODEBUG: " fmt
12+
1013
#include <linux/debugobjects.h>
1114
#include <linux/interrupt.h>
1215
#include <linux/sched.h>
@@ -218,7 +221,7 @@ static void debug_objects_oom(void)
218221
unsigned long flags;
219222
int i;
220223

221-
pr_warn("ODEBUG: Out of memory. ODEBUG disabled\n");
224+
pr_warn("Out of memory. ODEBUG disabled\n");
222225

223226
for (i = 0; i < ODEBUG_HASH_SIZE; i++, db++) {
224227
raw_spin_lock_irqsave(&db->lock, flags);
@@ -292,9 +295,9 @@ static void debug_object_is_on_stack(void *addr, int onstack)
292295

293296
limit++;
294297
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");
296299
else
297-
pr_warn("ODEBUG: object is not on stack, but annotated\n");
300+
pr_warn("object is not on stack, but annotated\n");
298301
WARN_ON(1);
299302
}
300303

@@ -983,7 +986,7 @@ static void __init debug_objects_selftest(void)
983986
if (check_results(&obj, ODEBUG_STATE_NONE, ++fixups, ++warnings))
984987
goto out;
985988
#endif
986-
pr_info("ODEBUG: selftest passed\n");
989+
pr_info("selftest passed\n");
987990

988991
out:
989992
debug_objects_fixups = oldfixups;
@@ -1088,7 +1091,7 @@ void __init debug_objects_mem_init(void)
10881091
debug_objects_enabled = 0;
10891092
if (obj_cache)
10901093
kmem_cache_destroy(obj_cache);
1091-
pr_warn("ODEBUG: out of memory.\n");
1094+
pr_warn("out of memory.\n");
10921095
} else
10931096
debug_objects_selftest();
10941097
}

0 commit comments

Comments
 (0)