Skip to content

Commit

Permalink
socket: replace some printk with pr_*
Browse files Browse the repository at this point in the history
Prefer pr_*(...) to printk(KERN_* ...).

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Yang Yingliang authored and David S. Miller committed Feb 13, 2014
1 parent 730c8c6 commit 3410f22
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions net/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ void sock_release(struct socket *sock)
}

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))
return;
Expand Down Expand Up @@ -1265,8 +1265,8 @@ int __sock_create(struct net *net, int family, int type, int protocol,
static int warned;
if (!warned) {
warned = 1;
printk(KERN_INFO "%s uses obsolete (PF_INET,SOCK_PACKET)\n",
current->comm);
pr_info("%s uses obsolete (PF_INET,SOCK_PACKET)\n",
current->comm);
}
family = PF_PACKET;
}
Expand Down Expand Up @@ -2595,8 +2595,7 @@ int sock_register(const struct net_proto_family *ops)
int err;

if (ops->family >= NPROTO) {
printk(KERN_CRIT "protocol %d >= NPROTO(%d)\n", ops->family,
NPROTO);
pr_crit("protocol %d >= NPROTO(%d)\n", ops->family, NPROTO);
return -ENOBUFS;
}

Expand All @@ -2610,7 +2609,7 @@ int sock_register(const struct net_proto_family *ops)
}
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;
}
EXPORT_SYMBOL(sock_register);
Expand Down Expand Up @@ -2638,7 +2637,7 @@ void sock_unregister(int family)

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);

Expand Down

0 comments on commit 3410f22

Please sign in to comment.