From: Wang Weidong <wangweidong1@huawei•com>
To: David Miller <davem@davemloft•net>
Cc: <edumazet@google•com>, <ebiederm@xmission•com>,
<gaofeng@cn•fujitsu.com>, <jacob.e.keller@intel•com>,
<netdev@vger•kernel.org>, Daniel Borkmann <dborkman@redhat•com>
Subject: [PATCH net-next v2] unix: convert printks to pr_<level>
Date: Fri, 6 Dec 2013 18:03:36 +0800 [thread overview]
Message-ID: <52A1A0F8.9080506@huawei.com> (raw)
In-Reply-To: <52A16A19.60001@huawei.com>
use pr_<level> instead of printk(LEVEL)
Signed-off-by: Wang Weidong <wangweidong1@huawei•com>
---
net/unix/af_unix.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 01625cc..8136222 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -80,6 +80,8 @@
* with BSD names.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/signal.h>
@@ -366,7 +368,7 @@ static void unix_sock_destructor(struct sock *sk)
WARN_ON(!sk_unhashed(sk));
WARN_ON(sk->sk_socket);
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;
}
@@ -378,7 +380,7 @@ static void unix_sock_destructor(struct sock *sk)
sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1);
local_bh_enable();
#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));
#endif
}
@@ -2433,8 +2435,7 @@ static int __init af_unix_init(void)
rc = proto_register(&unix_proto, 1);
if (rc != 0) {
- printk(KERN_CRIT "%s: Cannot create unix_sock SLAB cache!\n",
- __func__);
+ pr_crit("%s: Cannot create unix_sock SLAB cache!\n", __func__);
goto out;
}
--
1.7.12
next prev parent reply other threads:[~2013-12-06 10:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-06 6:09 [PATCH net-next] unix: convert printks to pr_<level> Wang Weidong
2013-12-06 9:22 ` Daniel Borkmann
2013-12-06 9:32 ` Wang Weidong
2013-12-06 9:40 ` Daniel Borkmann
2013-12-06 9:44 ` Wang Weidong
2013-12-06 10:03 ` Wang Weidong [this message]
2013-12-06 21:36 ` [PATCH net-next v2] " David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52A1A0F8.9080506@huawei.com \
--to=wangweidong1@huawei$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=dborkman@redhat$(echo .)com \
--cc=ebiederm@xmission$(echo .)com \
--cc=edumazet@google$(echo .)com \
--cc=gaofeng@cn$(echo .)fujitsu.com \
--cc=jacob.e.keller@intel$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox