Skip to content

Commit d7ffef2

Browse files
Fabian Fredericktorvalds
authored andcommitted
lib/debugobjects.c: convert printk to pr_foo()
Convert all printk to pr_foo() except KERN_DEBUG (see Documentation/CodingStyle Chapter 13) 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 1d88aa4 commit d7ffef2

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

‎lib/debugobjects.c‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ static void debug_objects_oom(void)
218218
unsigned long flags;
219219
int i;
220220

221-
printk(KERN_WARNING "ODEBUG: Out of memory. ODEBUG disabled\n");
221+
pr_warn("ODEBUG: Out of memory. ODEBUG disabled\n");
222222

223223
for (i = 0; i < ODEBUG_HASH_SIZE; i++, db++) {
224224
raw_spin_lock_irqsave(&db->lock, flags);
@@ -292,11 +292,9 @@ static void debug_object_is_on_stack(void *addr, int onstack)
292292

293293
limit++;
294294
if (is_on_stack)
295-
printk(KERN_WARNING
296-
"ODEBUG: object is on stack, but not annotated\n");
295+
pr_warn("ODEBUG: object is on stack, but not annotated\n");
297296
else
298-
printk(KERN_WARNING
299-
"ODEBUG: object is not on stack, but annotated\n");
297+
pr_warn("ODEBUG: object is not on stack, but annotated\n");
300298
WARN_ON(1);
301299
}
302300

@@ -985,7 +983,7 @@ static void __init debug_objects_selftest(void)
985983
if (check_results(&obj, ODEBUG_STATE_NONE, ++fixups, ++warnings))
986984
goto out;
987985
#endif
988-
printk(KERN_INFO "ODEBUG: selftest passed\n");
986+
pr_info("ODEBUG: selftest passed\n");
989987

990988
out:
991989
debug_objects_fixups = oldfixups;
@@ -1090,7 +1088,7 @@ void __init debug_objects_mem_init(void)
10901088
debug_objects_enabled = 0;
10911089
if (obj_cache)
10921090
kmem_cache_destroy(obj_cache);
1093-
printk(KERN_WARNING "ODEBUG: out of memory.\n");
1091+
pr_warn("ODEBUG: out of memory.\n");
10941092
} else
10951093
debug_objects_selftest();
10961094
}

0 commit comments

Comments
 (0)