[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1362380238-10435-1-git-send-email-amwang@redhat.com>
Date: Mon, 4 Mar 2013 14:57:18 +0800
From: Cong Wang <amwang@...hat.com>
To: netdev@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
Venkat Venkatsubra <venkat.x.venkatsubra@...cle.com>,
Cong Wang <amwang@...hat.com>
Subject: [Patch net] rds: simplify a warning message
From: Cong Wang <amwang@...hat.com>
Cc: David S. Miller <davem@...emloft.net>
Cc: Venkat Venkatsubra <venkat.x.venkatsubra@...cle.com>
Signed-off-by: Cong Wang <amwang@...hat.com>
---
diff --git a/net/rds/message.c b/net/rds/message.c
index f0a4658..5586cae 100644
--- a/net/rds/message.c
+++ b/net/rds/message.c
@@ -82,10 +82,7 @@ static void rds_message_purge(struct rds_message *rm)
void rds_message_put(struct rds_message *rm)
{
rdsdebug("put rm %p ref %d\n", rm, atomic_read(&rm->m_refcount));
- if (atomic_read(&rm->m_refcount) == 0) {
-printk(KERN_CRIT "danger refcount zero on %p\n", rm);
-WARN_ON(1);
- }
+ WARN(!atomic_read(&rm->m_refcount), "danger refcount zero on %p\n", rm);
if (atomic_dec_and_test(&rm->m_refcount)) {
BUG_ON(!list_empty(&rm->m_sock_item));
BUG_ON(!list_empty(&rm->m_conn_item));
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists