On Thu, 2013-01-31 at 14:20 -0800, akpm@xxxxxxxxxxxxxxxxxxxx wrote: > From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> > Subject: fs/proc: clean up printks > > - use pr_foo() throughout > > - remove a couple of duplicated KERN_WARNINGs, via WARN(KERN_WARNING "...") > > - nuke a few warnings which I've never seen happen, ever. Ignorable trivial comments only: o Use pr_warn instead of pr_warning o Consider using "%s: ...", __func__, ... instead of "function_name: ...", ... o As printk.h is included by kernel.h, and that is unlikely to be changed, it's probably not useful/necessary to add #include <linux/printk.h> anywhere o Consider using #define pr_fmt(fmt) where useful o Consider coalescing formats o Consider realigning arguments after name changes > diff -puN fs/proc/base.c~fs-proc-clean-up-printks fs/proc/base.c > @@ -952,7 +953,7 @@ static ssize_t oom_adj_write(struct file [] > - printk_once(KERN_WARNING "%s (%d): /proc/%d/oom_adj is deprecated, please use /proc/%d/oom_score_adj instead.\n", > + pr_warn_once("%s (%d): /proc/%d/oom_adj is deprecated, please use /proc/%d/oom_score_adj instead.\n", > current->comm, task_pid_nr(current), task_pid_nr(task), > task_pid_nr(task)); Align args > diff -puN fs/proc/generic.c~fs-proc-clean-up-printks fs/proc/generic.c [] > - printk(KERN_WARNING > - "proc_file_read: Read count exceeded\n"); > + pr_warn("proc_file_read: count exceeded\n"); "%s: ...", __func__, > @@ -837,7 +828,7 @@ void remove_proc_entry(const char *name, [] > - WARN(de->subdir, KERN_WARNING "%s: removing non-empty directory " > + WARN(de->subdir, "%s: removing non-empty directory " > "'%s/%s', leaking at least '%s'\n", __func__, coalesce, align > diff -puN fs/proc/inode.c~fs-proc-clean-up-printks fs/proc/inode.c [] > @@ -498,14 +499,14 @@ int proc_fill_super(struct super_block * > - printk(KERN_ERR "proc_fill_super: get root inode failed\n"); > + pr_warn("proc_fill_super: get root inode failed\n"); "%s: ...", __func__, > - printk(KERN_ERR "proc_fill_super: allocate dentry failed\n"); > + pr_err("proc_fill_super: allocate dentry failed\n"); etc... > diff -puN fs/proc/proc_devtree.c~fs-proc-clean-up-printks fs/proc/proc_devtree.c > --- a/fs/proc/proc_devtree.c~fs-proc-clean-up-printks > +++ a/fs/proc/proc_devtree.c > @@ -8,6 +8,7 @@ pr_fmt? > diff -puN fs/proc/proc_sysctl.c~fs-proc-clean-up-printks fs/proc/proc_sysctl.c [] > @@ -995,8 +996,8 @@ static int sysctl_err(const char *path, [] > - printk(KERN_ERR "sysctl table check failed: %s/%s %pV\n", > - path, table->procname, &vaf); > + pr_err("sysctl table check failed: %s/%s %pV\n", > + path, table->procname, &vaf); Align args? > diff -puN fs/proc/vmcore.c~fs-proc-clean-up-printks fs/proc/vmcore.c [] > @@ -553,8 +554,7 @@ static int __init parse_crash_elf64_head [] > - printk(KERN_WARNING "Warning: Core image elf header is not" > - "sane\n"); > + pr_warning("Warning: Core image elf header is not sane\n"); pr_warn (many times) -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html