Commit 04541a2f authored by Fabian Frederick's avatar Fabian Frederick Committed by Linus Torvalds

fs/devpts/inode.c: convert printk to pr_foo()

Also convert spaces to tabs (checkpatch warnings) if (!dentry) KERN_NOTICE
converted to pr_err (like if (!inode) error process)

[akpm@linux-foundation.org: use KBUILD_MODNAME, per Joe]
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Cc: Joe Perches <joe@perches.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0227d6ab
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
* *
* ------------------------------------------------------------------------- */ * ------------------------------------------------------------------------- */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/fs.h> #include <linux/fs.h>
...@@ -225,7 +227,7 @@ static int parse_mount_options(char *data, int op, struct pts_mount_opts *opts) ...@@ -225,7 +227,7 @@ static int parse_mount_options(char *data, int op, struct pts_mount_opts *opts)
break; break;
#endif #endif
default: default:
printk(KERN_ERR "devpts: called with bogus options\n"); pr_err("called with bogus options\n");
return -EINVAL; return -EINVAL;
} }
} }
...@@ -261,7 +263,7 @@ static int mknod_ptmx(struct super_block *sb) ...@@ -261,7 +263,7 @@ static int mknod_ptmx(struct super_block *sb)
dentry = d_alloc_name(root, "ptmx"); dentry = d_alloc_name(root, "ptmx");
if (!dentry) { if (!dentry) {
printk(KERN_NOTICE "Unable to alloc dentry for ptmx node\n"); pr_err("Unable to alloc dentry for ptmx node\n");
goto out; goto out;
} }
...@@ -270,7 +272,7 @@ static int mknod_ptmx(struct super_block *sb) ...@@ -270,7 +272,7 @@ static int mknod_ptmx(struct super_block *sb)
*/ */
inode = new_inode(sb); inode = new_inode(sb);
if (!inode) { if (!inode) {
printk(KERN_ERR "Unable to alloc inode for ptmx node\n"); pr_err("Unable to alloc inode for ptmx node\n");
dput(dentry); dput(dentry);
goto out; goto out;
} }
...@@ -333,9 +335,11 @@ static int devpts_show_options(struct seq_file *seq, struct dentry *root) ...@@ -333,9 +335,11 @@ static int devpts_show_options(struct seq_file *seq, struct dentry *root)
struct pts_mount_opts *opts = &fsi->mount_opts; struct pts_mount_opts *opts = &fsi->mount_opts;
if (opts->setuid) if (opts->setuid)
seq_printf(seq, ",uid=%u", from_kuid_munged(&init_user_ns, opts->uid)); seq_printf(seq, ",uid=%u",
from_kuid_munged(&init_user_ns, opts->uid));
if (opts->setgid) if (opts->setgid)
seq_printf(seq, ",gid=%u", from_kgid_munged(&init_user_ns, opts->gid)); seq_printf(seq, ",gid=%u",
from_kgid_munged(&init_user_ns, opts->gid));
seq_printf(seq, ",mode=%03o", opts->mode); seq_printf(seq, ",mode=%03o", opts->mode);
#ifdef CONFIG_DEVPTS_MULTIPLE_INSTANCES #ifdef CONFIG_DEVPTS_MULTIPLE_INSTANCES
seq_printf(seq, ",ptmxmode=%03o", opts->ptmxmode); seq_printf(seq, ",ptmxmode=%03o", opts->ptmxmode);
...@@ -396,7 +400,7 @@ devpts_fill_super(struct super_block *s, void *data, int silent) ...@@ -396,7 +400,7 @@ devpts_fill_super(struct super_block *s, void *data, int silent)
if (s->s_root) if (s->s_root)
return 0; return 0;
printk(KERN_ERR "devpts: get root dentry failed\n"); pr_err("get root dentry failed\n");
fail: fail:
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment