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

Configure Feed

Select the types of activity you want to include in your feed.

devtmpfs: convert to pr_fmt

Use the pr_fmt() macro to prefix all the output with "devtmpfs: ".
while at it, convert printk(<LEVEL>) to pr_<level>().

Signed-off-by: Longlong Xia <xialonglong1@huawei.com>
Link: https://lore.kernel.org/r/20230202033203.1239239-2-xialonglong1@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Longlong Xia and committed by
Greg Kroah-Hartman
5cdc03c5 37e98d9b

+8 -8
+8 -8
drivers/base/devtmpfs.c
··· 13 13 * overwrite the default setting if needed. 14 14 */ 15 15 16 + #define pr_fmt(fmt) "devtmpfs: " fmt 17 + 16 18 #include <linux/kernel.h> 17 19 #include <linux/syscalls.h> 18 20 #include <linux/mount.h> ··· 378 376 379 377 err = init_mount("devtmpfs", "dev", "devtmpfs", DEVTMPFS_MFLAGS, NULL); 380 378 if (err) 381 - printk(KERN_INFO "devtmpfs: error mounting %i\n", err); 379 + pr_info("error mounting %d\n", err); 382 380 else 383 - printk(KERN_INFO "devtmpfs: mounted\n"); 381 + pr_info("mounted\n"); 384 382 return err; 385 383 } 386 384 ··· 462 460 463 461 mnt = vfs_kern_mount(&internal_fs_type, 0, "devtmpfs", opts); 464 462 if (IS_ERR(mnt)) { 465 - printk(KERN_ERR "devtmpfs: unable to create devtmpfs %ld\n", 466 - PTR_ERR(mnt)); 463 + pr_err("unable to create devtmpfs %ld\n", PTR_ERR(mnt)); 467 464 return PTR_ERR(mnt); 468 465 } 469 466 err = register_filesystem(&dev_fs_type); 470 467 if (err) { 471 - printk(KERN_ERR "devtmpfs: unable to register devtmpfs " 472 - "type %i\n", err); 468 + pr_err("unable to register devtmpfs type %d\n", err); 473 469 return err; 474 470 } 475 471 ··· 480 480 } 481 481 482 482 if (err) { 483 - printk(KERN_ERR "devtmpfs: unable to create devtmpfs %i\n", err); 483 + pr_err("unable to create devtmpfs %d\n", err); 484 484 unregister_filesystem(&dev_fs_type); 485 485 thread = NULL; 486 486 return err; 487 487 } 488 488 489 - printk(KERN_INFO "devtmpfs: initialized\n"); 489 + pr_info("initialized\n"); 490 490 return 0; 491 491 }