From: Cong Wang Date: Sun, 3 Mar 2013 20:57:18 +0000 (+0000) Subject: rds: simplify a warning message X-Git-Tag: submit/tizen/20141203.153721~2711^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7dac1b514a00817ddb43704068c14ffd8b8fba19;p=platform%2Fkernel%2Flinux-arm64.git rds: simplify a warning message Cc: David S. Miller Cc: Venkat Venkatsubra Signed-off-by: Cong Wang Signed-off-by: David S. Miller --- diff --git a/net/rds/message.c b/net/rds/message.c index aff589cc022..aba232f9f30 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));