Commit 5cc208be authored by wangweidong's avatar wangweidong Committed by David S. Miller

unix: convert printks to pr_<level>

use pr_<level> instead of printk(LEVEL)
Signed-off-by: default avatarWang Weidong <wangweidong1@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 53bd6749
...@@ -80,6 +80,8 @@ ...@@ -80,6 +80,8 @@
* with BSD names. * with BSD names.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/signal.h> #include <linux/signal.h>
...@@ -366,7 +368,7 @@ static void unix_sock_destructor(struct sock *sk) ...@@ -366,7 +368,7 @@ static void unix_sock_destructor(struct sock *sk)
WARN_ON(!sk_unhashed(sk)); WARN_ON(!sk_unhashed(sk));
WARN_ON(sk->sk_socket); WARN_ON(sk->sk_socket);
if (!sock_flag(sk, SOCK_DEAD)) { if (!sock_flag(sk, SOCK_DEAD)) {
printk(KERN_INFO "Attempt to release alive unix socket: %p\n", sk); pr_info("Attempt to release alive unix socket: %p\n", sk);
return; return;
} }
...@@ -378,7 +380,7 @@ static void unix_sock_destructor(struct sock *sk) ...@@ -378,7 +380,7 @@ static void unix_sock_destructor(struct sock *sk)
sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1);
local_bh_enable(); local_bh_enable();
#ifdef UNIX_REFCNT_DEBUG #ifdef UNIX_REFCNT_DEBUG
printk(KERN_DEBUG "UNIX %p is destroyed, %ld are still alive.\n", sk, pr_debug("UNIX %p is destroyed, %ld are still alive.\n", sk,
atomic_long_read(&unix_nr_socks)); atomic_long_read(&unix_nr_socks));
#endif #endif
} }
...@@ -2433,8 +2435,7 @@ static int __init af_unix_init(void) ...@@ -2433,8 +2435,7 @@ static int __init af_unix_init(void)
rc = proto_register(&unix_proto, 1); rc = proto_register(&unix_proto, 1);
if (rc != 0) { if (rc != 0) {
printk(KERN_CRIT "%s: Cannot create unix_sock SLAB cache!\n", pr_crit("%s: Cannot create unix_sock SLAB cache!\n", __func__);
__func__);
goto out; goto out;
} }
......
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