mm: convert some level-less printks to pr_*
printk is meant to be used with an associated log level. There are some instances of printk scattered around the mm code where the log level is missing. Add a log level and adhere to suggestions by scripts/checkpatch.pl by moving to the pr_* macros. Also add the typical pr_fmt definition so that print statements can be easily traced back to the modules where they occur, correlated one with another, etc. This will require the removal of some (now redundant) prefixes on a few print statements. Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Esse commit está contido em:

commit de
Linus Torvalds

pai
b3fe92b03d
commit
b1de0d139c
@@ -13,6 +13,8 @@
|
||||
* Copyright (c) 2007-2010 Paul Mundt <lethal@linux-sh.org>
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/export.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/vmacache.h>
|
||||
@@ -32,6 +34,7 @@
|
||||
#include <linux/syscalls.h>
|
||||
#include <linux/audit.h>
|
||||
#include <linux/sched/sysctl.h>
|
||||
#include <linux/printk.h>
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/tlb.h>
|
||||
@@ -1246,7 +1249,7 @@ error_free:
|
||||
return ret;
|
||||
|
||||
enomem:
|
||||
printk("Allocation of length %lu from process %d (%s) failed\n",
|
||||
pr_err("Allocation of length %lu from process %d (%s) failed\n",
|
||||
len, current->pid, current->comm);
|
||||
show_free_areas(0);
|
||||
return -ENOMEM;
|
||||
|
Referência em uma nova issue
Block a user