Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Fabian Frederick <fabf@skynet.be>
Cc: Joe Perches <joe@perches.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Fabian Frederick and committed by
Linus Torvalds
04541a2f 0227d6ab

+15 -11
+15 -11
fs/devpts/inode.c
··· 10 10 * 11 11 * ------------------------------------------------------------------------- */ 12 12 13 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 14 + 13 15 #include <linux/module.h> 14 16 #include <linux/init.h> 15 17 #include <linux/fs.h> ··· 150 148 151 149 /* 152 150 * parse_mount_options(): 153 - * Set @opts to mount options specified in @data. If an option is not 154 - * specified in @data, set it to its default value. The exception is 155 - * 'newinstance' option which can only be set/cleared on a mount (i.e. 156 - * cannot be changed during remount). 151 + * Set @opts to mount options specified in @data. If an option is not 152 + * specified in @data, set it to its default value. The exception is 153 + * 'newinstance' option which can only be set/cleared on a mount (i.e. 154 + * cannot be changed during remount). 157 155 * 158 156 * Note: @data may be NULL (in which case all options are set to default). 159 157 */ ··· 227 225 break; 228 226 #endif 229 227 default: 230 - printk(KERN_ERR "devpts: called with bogus options\n"); 228 + pr_err("called with bogus options\n"); 231 229 return -EINVAL; 232 230 } 233 231 } ··· 263 261 264 262 dentry = d_alloc_name(root, "ptmx"); 265 263 if (!dentry) { 266 - printk(KERN_NOTICE "Unable to alloc dentry for ptmx node\n"); 264 + pr_err("Unable to alloc dentry for ptmx node\n"); 267 265 goto out; 268 266 } 269 267 ··· 272 270 */ 273 271 inode = new_inode(sb); 274 272 if (!inode) { 275 - printk(KERN_ERR "Unable to alloc inode for ptmx node\n"); 273 + pr_err("Unable to alloc inode for ptmx node\n"); 276 274 dput(dentry); 277 275 goto out; 278 276 } ··· 305 303 #else 306 304 static inline void update_ptmx_mode(struct pts_fs_info *fsi) 307 305 { 308 - return; 306 + return; 309 307 } 310 308 #endif 311 309 ··· 335 333 struct pts_mount_opts *opts = &fsi->mount_opts; 336 334 337 335 if (opts->setuid) 338 - seq_printf(seq, ",uid=%u", from_kuid_munged(&init_user_ns, opts->uid)); 336 + seq_printf(seq, ",uid=%u", 337 + from_kuid_munged(&init_user_ns, opts->uid)); 339 338 if (opts->setgid) 340 - seq_printf(seq, ",gid=%u", from_kgid_munged(&init_user_ns, opts->gid)); 339 + seq_printf(seq, ",gid=%u", 340 + from_kgid_munged(&init_user_ns, opts->gid)); 341 341 seq_printf(seq, ",mode=%03o", opts->mode); 342 342 #ifdef CONFIG_DEVPTS_MULTIPLE_INSTANCES 343 343 seq_printf(seq, ",ptmxmode=%03o", opts->ptmxmode); ··· 400 396 if (s->s_root) 401 397 return 0; 402 398 403 - printk(KERN_ERR "devpts: get root dentry failed\n"); 399 + pr_err("get root dentry failed\n"); 404 400 405 401 fail: 406 402 return -ENOMEM;