Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

socket: replace some printk with pr_*

Prefer pr_*(...) to printk(KERN_* ...).

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Yang Yingliang and committed by
David S. Miller
3410f22e 730c8c69

+6 -7
+6 -7
net/socket.c
··· 593 593 } 594 594 595 595 if (rcu_dereference_protected(sock->wq, 1)->fasync_list) 596 - printk(KERN_ERR "sock_release: fasync list not empty!\n"); 596 + pr_err("%s: fasync list not empty!\n", __func__); 597 597 598 598 if (test_bit(SOCK_EXTERNALLY_ALLOCATED, &sock->flags)) 599 599 return; ··· 1265 1265 static int warned; 1266 1266 if (!warned) { 1267 1267 warned = 1; 1268 - printk(KERN_INFO "%s uses obsolete (PF_INET,SOCK_PACKET)\n", 1269 - current->comm); 1268 + pr_info("%s uses obsolete (PF_INET,SOCK_PACKET)\n", 1269 + current->comm); 1270 1270 } 1271 1271 family = PF_PACKET; 1272 1272 } ··· 2595 2595 int err; 2596 2596 2597 2597 if (ops->family >= NPROTO) { 2598 - printk(KERN_CRIT "protocol %d >= NPROTO(%d)\n", ops->family, 2599 - NPROTO); 2598 + pr_crit("protocol %d >= NPROTO(%d)\n", ops->family, NPROTO); 2600 2599 return -ENOBUFS; 2601 2600 } 2602 2601 ··· 2609 2610 } 2610 2611 spin_unlock(&net_family_lock); 2611 2612 2612 - printk(KERN_INFO "NET: Registered protocol family %d\n", ops->family); 2613 + pr_info("NET: Registered protocol family %d\n", ops->family); 2613 2614 return err; 2614 2615 } 2615 2616 EXPORT_SYMBOL(sock_register); ··· 2637 2638 2638 2639 synchronize_rcu(); 2639 2640 2640 - printk(KERN_INFO "NET: Unregistered protocol family %d\n", family); 2641 + pr_info("NET: Unregistered protocol family %d\n", family); 2641 2642 } 2642 2643 EXPORT_SYMBOL(sock_unregister); 2643 2644