summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBo YU <tsu.yubo@gmail.com>2019-01-09 04:17:00 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-22 14:25:26 +0100
commitb3fa29ad83770c764909d8497be3866ad341a3a6 (patch)
treed318d50443bd5988c7280fab1b09ba2c1193a8f4 /lib
parent7ab35a14de257d5fdac9c7e44c4a1a69967f9fa2 (diff)
downloadlinux-b3fa29ad83770c764909d8497be3866ad341a3a6.tar.gz
linux-b3fa29ad83770c764909d8497be3866ad341a3a6.tar.bz2
linux-b3fa29ad83770c764909d8497be3866ad341a3a6.zip
kobject: to repalce printk with pr_* style
Repalce printk with pr_warn in kobject_synth_uevent and replace printk with pr_err in uevent_net_init to make both consistent with other code in kobject_uevent.c Signed-off-by: Bo YU <tsu.yubo@gmail.com> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/kobject_uevent.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index 27c6118afd1c..c87a96c4800e 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -224,7 +224,7 @@ int kobject_synth_uevent(struct kobject *kobj, const char *buf, size_t count)
out:
if (r) {
devpath = kobject_get_path(kobj, GFP_KERNEL);
- printk(KERN_WARNING "synth uevent: %s: %s",
+ pr_warn("synth uevent: %s: %s",
devpath ?: "unknown device",
msg ?: "failed to send uevent");
kfree(devpath);
@@ -765,8 +765,7 @@ static int uevent_net_init(struct net *net)
ue_sk->sk = netlink_kernel_create(net, NETLINK_KOBJECT_UEVENT, &cfg);
if (!ue_sk->sk) {
- printk(KERN_ERR
- "kobject_uevent: unable to create netlink socket!\n");
+ pr_err("kobject_uevent: unable to create netlink socket!\n");
kfree(ue_sk);
return -ENODEV;
}