All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ioana Ciornei <ciorneiioana@gmail.com>
To: ceph-devel@vger.kernel.org
Cc: elder@ieee.org, Ioana Ciornei <ciorneiioana@gmail.com>
Subject: [PATCH 5/6] net: ceph: messenger: change printk to pr_warn
Date: Wed, 27 Jan 2016 02:43:38 +0200	[thread overview]
Message-ID: <ec8365198a0afd9538362e68393eebbdb1e0e61e.1453853617.git.ciorneiioana@gmail.com> (raw)
In-Reply-To: <cover.1453853617.git.ciorneiioana@gmail.com>
In-Reply-To: <cover.1453853617.git.ciorneiioana@gmail.com>

This patch changes the printk call into the preferred function
pr_warn(). Since the intention is to just warn the user it is the best
level of facility.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
---
 net/ceph/messenger.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 6b15876..8f1582e 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -329,7 +329,8 @@ static void con_sock_state_init(struct ceph_connection *con)
 
 	old_state = atomic_xchg(&con->sock_state, CON_SOCK_STATE_CLOSED);
 	if (WARN_ON(old_state != CON_SOCK_STATE_NEW))
-		printk("%s: unexpected old state %d\n", __func__, old_state);
+		pr_warn("%s: unexpected old state %d\n", __func__,
+			old_state);
 	dout("%s con %p sock %d -> %d\n", __func__, con, old_state,
 	     CON_SOCK_STATE_CLOSED);
 }
@@ -340,7 +341,8 @@ static void con_sock_state_connecting(struct ceph_connection *con)
 
 	old_state = atomic_xchg(&con->sock_state, CON_SOCK_STATE_CONNECTING);
 	if (WARN_ON(old_state != CON_SOCK_STATE_CLOSED))
-		printk("%s: unexpected old state %d\n", __func__, old_state);
+		pr_warn("%s: unexpected old state %d\n", __func__,
+			old_state);
 	dout("%s con %p sock %d -> %d\n", __func__, con, old_state,
 	     CON_SOCK_STATE_CONNECTING);
 }
@@ -351,7 +353,8 @@ static void con_sock_state_connected(struct ceph_connection *con)
 
 	old_state = atomic_xchg(&con->sock_state, CON_SOCK_STATE_CONNECTED);
 	if (WARN_ON(old_state != CON_SOCK_STATE_CONNECTING))
-		printk("%s: unexpected old state %d\n", __func__, old_state);
+		pr_warn("%s: unexpected old state %d\n", __func__,
+			old_state);
 	dout("%s con %p sock %d -> %d\n", __func__, con, old_state,
 	     CON_SOCK_STATE_CONNECTED);
 }
@@ -364,7 +367,8 @@ static void con_sock_state_closing(struct ceph_connection *con)
 	if (WARN_ON(old_state != CON_SOCK_STATE_CONNECTING &&
 		    old_state != CON_SOCK_STATE_CONNECTED &&
 		    old_state != CON_SOCK_STATE_CLOSING))
-		printk("%s: unexpected old state %d\n", __func__, old_state);
+		pr_warn("%s: unexpected old state %d\n", __func__,
+			old_state);
 	dout("%s con %p sock %d -> %d\n", __func__, con, old_state,
 	     CON_SOCK_STATE_CLOSING);
 }
@@ -378,7 +382,8 @@ static void con_sock_state_closed(struct ceph_connection *con)
 		    old_state != CON_SOCK_STATE_CLOSING &&
 		    old_state != CON_SOCK_STATE_CONNECTING &&
 		    old_state != CON_SOCK_STATE_CLOSED))
-		printk("%s: unexpected old state %d\n", __func__, old_state);
+		pr_warn("%s: unexpected old state %d\n", __func__,
+			old_state);
 	dout("%s con %p sock %d -> %d\n", __func__, con, old_state,
 	     CON_SOCK_STATE_CLOSED);
 }
-- 
2.6.4


  parent reply	other threads:[~2016-01-26 22:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27  0:43 [PATCH 0/6] net: ceph: messenger: code cleanup Ioana Ciornei
2016-01-27  0:43 ` [PATCH 1/6] net: ceph: messenger: remove unnecessary blank spaces Ioana Ciornei
2016-01-27  0:43 ` [PATCH 2/6] net: ceph: messenger: fix coding style comparison to NULL Ioana Ciornei
2016-01-27  0:43 ` [PATCH 3/6] net: ceph: messenger: add blank line after declarations Ioana Ciornei
2016-01-27  0:43 ` [PATCH 4/6] net: ceph: messenger: properly align function parameters Ioana Ciornei
2016-01-27  0:43 ` Ioana Ciornei [this message]
2016-01-27  0:43 ` [PATCH 6/6] net: ceph: messenger: add braces to all arms of conditional statement Ioana Ciornei
2016-01-27 11:17 ` [PATCH 0/6] net: ceph: messenger: code cleanup Ilya Dryomov

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=ec8365198a0afd9538362e68393eebbdb1e0e61e.1453853617.git.ciorneiioana@gmail.com \
    --to=ciorneiioana@gmail.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=elder@ieee.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.