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 3/6] net: ceph: messenger: add blank line after declarations
Date: Wed, 27 Jan 2016 02:43:36 +0200	[thread overview]
Message-ID: <26cb4650cf99734eef76913bb2d9916721858342.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 adds a blank line after declarations in order to follow the
kernel coding style. Also, it adds spaces around a binary operator.

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

diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 7a8bc51..6a0962d 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -389,6 +389,7 @@ static void con_sock_state_closed(struct ceph_connection *con)
 static void ceph_sock_data_ready(struct sock *sk)
 {
 	struct ceph_connection *con = sk->sk_user_data;
+
 	if (atomic_read(&con->msgr->stopping)) {
 		return;
 	}
@@ -457,6 +458,7 @@ static void set_sock_callbacks(struct socket *sock,
 			       struct ceph_connection *con)
 {
 	struct sock *sk = sock->sk;
+
 	sk->sk_user_data = con;
 	sk->sk_data_ready = ceph_sock_data_ready;
 	sk->sk_write_space = ceph_sock_write_space;
@@ -636,6 +638,7 @@ static void ceph_msg_remove(struct ceph_msg *msg)
 
 	ceph_msg_put(msg);
 }
+
 static void ceph_msg_remove_list(struct list_head *head)
 {
 	while (!list_empty(head)) {
@@ -1384,7 +1387,6 @@ static void prepare_write_keepalive(struct ceph_connection *con)
 /*
  * Connection negotiation.
  */
-
 static struct ceph_auth_handshake *get_connect_authorizer(struct ceph_connection *con,
 						int *auth_proto)
 {
@@ -1543,6 +1545,7 @@ static int write_partial_message_data(struct ceph_connection *con)
 {
 	struct ceph_msg *msg = con->out_msg;
 	struct ceph_msg_data_cursor *cursor = &msg->cursor;
+
 	bool do_datacrc = !ceph_test_opt(from_msgr(con->msgr), NOCRC);
 	u32 crc;
 
@@ -1677,6 +1680,7 @@ static int read_partial(struct ceph_connection *con,
 		int left = end - con->in_base_pos;
 		int have = size - left;
 		int ret = ceph_tcp_recvmsg(con->sock, object + have, left);
+
 		if (ret <= 0)
 			return ret;
 		con->in_base_pos += ret;
@@ -1904,7 +1908,7 @@ int ceph_parse_ips(const char *c, const char *end,
 	int i, ret = -EINVAL;
 	const char *p = c;
 
-	dout("parse_ips on '%.*s'\n", (int)(end-c), c);
+	dout("parse_ips on '%.*s'\n", (int)(end - c), c);
 	for (i = 0; i < max_count; i++) {
 		const char *ipend;
 		struct sockaddr_storage *ss = &addr[i].in_addr;
@@ -2479,6 +2483,7 @@ static int read_keepalive_ack(struct ceph_connection *con)
 	struct ceph_timespec ceph_ts;
 	size_t size = sizeof(ceph_ts);
 	int ret = read_partial(con, size, size, &ceph_ts);
+
 	if (ret <= 0)
 		return ret;
 	ceph_decode_timespec(&con->last_keepalive_ack, &ceph_ts);
@@ -3151,6 +3156,7 @@ bool ceph_con_keepalive_expired(struct ceph_connection *con,
 	    (con->peer_features & CEPH_FEATURE_MSGR_KEEPALIVE2)) {
 		struct timespec now = CURRENT_TIME;
 		struct timespec ts;
+
 		jiffies_to_timespec(interval, &ts);
 		ts = timespec_add(con->last_keepalive_ack, ts);
 		return timespec_compare(&now, &ts) >= 0;
-- 
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 ` Ioana Ciornei [this message]
2016-01-27  0:43 ` [PATCH 4/6] net: ceph: messenger: properly align function parameters Ioana Ciornei
2016-01-27  0:43 ` [PATCH 5/6] net: ceph: messenger: change printk to pr_warn Ioana Ciornei
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=26cb4650cf99734eef76913bb2d9916721858342.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.