[PATCH 12/12] samples: configfs: prefer pr_err() over bare printk(KERN_ERR
From: Bartosz Golaszewski
Date: Thu Sep 24 2020 - 08:46:06 EST
From: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
pr_*() printing helpers are preferred over using bare printk().
Signed-off-by: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
---
samples/configfs/configfs_sample.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/samples/configfs/configfs_sample.c b/samples/configfs/configfs_sample.c
index da4e0f4ec20a..2f3b26d1d45e 100644
--- a/samples/configfs/configfs_sample.c
+++ b/samples/configfs/configfs_sample.c
@@ -340,9 +340,8 @@ static int __init configfs_example_init(void)
mutex_init(&subsys->su_mutex);
ret = configfs_register_subsystem(subsys);
if (ret) {
- printk(KERN_ERR "Error %d while registering subsystem %s\n",
- ret,
- subsys->su_group.cg_item.ci_namebuf);
+ pr_err("Error %d while registering subsystem %s\n",
+ ret, subsys->su_group.cg_item.ci_namebuf);
goto out_unregister;
}
}
--
2.17.1