netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch net] rds: simplify a warning message
@ 2013-03-04  6:57 Cong Wang
  2013-03-04 19:15 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Cong Wang @ 2013-03-04  6:57 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller, Venkat Venkatsubra, Cong Wang

From: Cong Wang <amwang@redhat.com>


Cc: David S. Miller <davem@davemloft.net>
Cc: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
Signed-off-by: Cong Wang <amwang@redhat.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));

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Patch net] rds: simplify a warning message
  2013-03-04  6:57 [Patch net] rds: simplify a warning message Cong Wang
@ 2013-03-04 19:15 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-03-04 19:15 UTC (permalink / raw)
  To: amwang; +Cc: netdev, venkat.x.venkatsubra

From: Cong Wang <amwang@redhat.com>
Date: Mon,  4 Mar 2013 14:57:18 +0800

> From: Cong Wang <amwang@redhat.com>
> 
> 
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
> Signed-off-by: Cong Wang <amwang@redhat.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-04 19:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-04  6:57 [Patch net] rds: simplify a warning message Cong Wang
2013-03-04 19:15 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).