Commit 3410f22e authored by Yang Yingliang's avatar Yang Yingliang Committed by David S. Miller

socket: replace some printk with pr_*

Prefer pr_*(...) to printk(KERN_* ...).
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 730c8c69
...@@ -593,7 +593,7 @@ void sock_release(struct socket *sock) ...@@ -593,7 +593,7 @@ void sock_release(struct socket *sock)
} }
if (rcu_dereference_protected(sock->wq, 1)->fasync_list) if (rcu_dereference_protected(sock->wq, 1)->fasync_list)
printk(KERN_ERR "sock_release: fasync list not empty!\n"); pr_err("%s: fasync list not empty!\n", __func__);
if (test_bit(SOCK_EXTERNALLY_ALLOCATED, &sock->flags)) if (test_bit(SOCK_EXTERNALLY_ALLOCATED, &sock->flags))
return; return;
...@@ -1265,8 +1265,8 @@ int __sock_create(struct net *net, int family, int type, int protocol, ...@@ -1265,8 +1265,8 @@ int __sock_create(struct net *net, int family, int type, int protocol,
static int warned; static int warned;
if (!warned) { if (!warned) {
warned = 1; warned = 1;
printk(KERN_INFO "%s uses obsolete (PF_INET,SOCK_PACKET)\n", pr_info("%s uses obsolete (PF_INET,SOCK_PACKET)\n",
current->comm); current->comm);
} }
family = PF_PACKET; family = PF_PACKET;
} }
...@@ -2595,8 +2595,7 @@ int sock_register(const struct net_proto_family *ops) ...@@ -2595,8 +2595,7 @@ int sock_register(const struct net_proto_family *ops)
int err; int err;
if (ops->family >= NPROTO) { if (ops->family >= NPROTO) {
printk(KERN_CRIT "protocol %d >= NPROTO(%d)\n", ops->family, pr_crit("protocol %d >= NPROTO(%d)\n", ops->family, NPROTO);
NPROTO);
return -ENOBUFS; return -ENOBUFS;
} }
...@@ -2610,7 +2609,7 @@ int sock_register(const struct net_proto_family *ops) ...@@ -2610,7 +2609,7 @@ int sock_register(const struct net_proto_family *ops)
} }
spin_unlock(&net_family_lock); spin_unlock(&net_family_lock);
printk(KERN_INFO "NET: Registered protocol family %d\n", ops->family); pr_info("NET: Registered protocol family %d\n", ops->family);
return err; return err;
} }
EXPORT_SYMBOL(sock_register); EXPORT_SYMBOL(sock_register);
...@@ -2638,7 +2637,7 @@ void sock_unregister(int family) ...@@ -2638,7 +2637,7 @@ void sock_unregister(int family)
synchronize_rcu(); synchronize_rcu();
printk(KERN_INFO "NET: Unregistered protocol family %d\n", family); pr_info("NET: Unregistered protocol family %d\n", family);
} }
EXPORT_SYMBOL(sock_unregister); EXPORT_SYMBOL(sock_unregister);
......
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