Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1425739 > unrolled thread
| Started by | Joshua Houghton <josh@awful.name> |
|---|---|
| First post | 2016-06-18 17:00 +0200 |
| Last post | 2016-06-19 06:40 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] net: rds: fix coding style issues Joshua Houghton <josh@awful.name> - 2016-06-18 17:00 +0200
Re: [PATCH] net: rds: fix coding style issues "santosh.shilimkar@oracle.com" <santosh.shilimkar@oracle.com> - 2016-06-18 18:30 +0200
Re: [PATCH] net: rds: fix coding style issues Joshua Houghton <josh@awful.name> - 2016-06-18 19:10 +0200
Re: [PATCH] net: rds: fix coding style issues David Miller <davem@davemloft.net> - 2016-06-19 06:40 +0200
| From | Joshua Houghton <josh@awful.name> |
|---|---|
| Date | 2016-06-18 17:00 +0200 |
| Subject | [PATCH] net: rds: fix coding style issues |
| Message-ID | <rLpT4-5m6-3@gated-at.bofh.it> |
Fix coding style issues in the following files:
ib_cm.c: add space
loop.c: convert spaces to tabs
sysctl.c: add space
tcp.h: convert spaces to tabs
tcp_connect.c:remove extra indentation in switch statement
tcp_recv.c: convert spaces to tabs
tcp_send.c: convert spaces to tabs
transport.c: move brace up one line on for statement
Signed-off-by: Joshua Houghton <josh@awful.name>
---
net/rds/ib_cm.c | 2 +-
net/rds/loop.c | 5 +++--
net/rds/sysctl.c | 3 ++-
net/rds/tcp.h | 2 +-
net/rds/tcp_connect.c | 26 +++++++++++++-------------
net/rds/tcp_recv.c | 2 +-
net/rds/tcp_send.c | 14 +++++++-------
net/rds/transport.c | 3 +--
8 files changed, 29 insertions(+), 28 deletions(-)
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
index 310cabc..7c2a65a 100644
--- a/net/rds/ib_cm.c
+++ b/net/rds/ib_cm.c
@@ -111,7 +111,7 @@ void rds_ib_cm_connect_complete(struct rds_connection *conn, struct rdma_cm_even
}
}
- if (conn->c_version < RDS_PROTOCOL(3,1)) {
+ if (conn->c_version < RDS_PROTOCOL(3, 1)) {
printk(KERN_NOTICE "RDS/IB: Connection to %pI4 version %u.%u failed,"
" no longer supported\n",
&conn->c_faddr,
diff --git a/net/rds/loop.c b/net/rds/loop.c
index 6b12b68..814173b 100644
--- a/net/rds/loop.c
+++ b/net/rds/loop.c
@@ -95,8 +95,9 @@ out:
*/
static void rds_loop_inc_free(struct rds_incoming *inc)
{
- struct rds_message *rm = container_of(inc, struct rds_message, m_inc);
- rds_message_put(rm);
+ struct rds_message *rm = container_of(inc, struct rds_message, m_inc);
+
+ rds_message_put(rm);
}
/* we need to at least give the thread something to succeed */
diff --git a/net/rds/sysctl.c b/net/rds/sysctl.c
index c173f69..e381bbc 100644
--- a/net/rds/sysctl.c
+++ b/net/rds/sysctl.c
@@ -102,7 +102,8 @@ int rds_sysctl_init(void)
rds_sysctl_reconnect_min = msecs_to_jiffies(1);
rds_sysctl_reconnect_min_jiffies = rds_sysctl_reconnect_min;
- rds_sysctl_reg_table = register_net_sysctl(&init_net,"net/rds", rds_sysctl_rds_table);
+ rds_sysctl_reg_table =
+ register_net_sysctl(&init_net, "net/rds", rds_sysctl_rds_table);
if (!rds_sysctl_reg_table)
return -ENOMEM;
return 0;
diff --git a/net/rds/tcp.h b/net/rds/tcp.h
index ec0602b..7940bab 100644
--- a/net/rds/tcp.h
+++ b/net/rds/tcp.h
@@ -83,7 +83,7 @@ int rds_tcp_inc_copy_to_user(struct rds_incoming *inc, struct iov_iter *to);
void rds_tcp_xmit_prepare(struct rds_connection *conn);
void rds_tcp_xmit_complete(struct rds_connection *conn);
int rds_tcp_xmit(struct rds_connection *conn, struct rds_message *rm,
- unsigned int hdr_off, unsigned int sg, unsigned int off);
+ unsigned int hdr_off, unsigned int sg, unsigned int off);
void rds_tcp_write_space(struct sock *sk);
/* tcp_stats.c */
diff --git a/net/rds/tcp_connect.c b/net/rds/tcp_connect.c
index fba13d0..f6e95d6 100644
--- a/net/rds/tcp_connect.c
+++ b/net/rds/tcp_connect.c
@@ -54,19 +54,19 @@ void rds_tcp_state_change(struct sock *sk)
rdsdebug("sock %p state_change to %d\n", tc->t_sock, sk->sk_state);
- switch(sk->sk_state) {
- /* ignore connecting sockets as they make progress */
- case TCP_SYN_SENT:
- case TCP_SYN_RECV:
- break;
- case TCP_ESTABLISHED:
- rds_connect_path_complete(conn, RDS_CONN_CONNECTING);
- break;
- case TCP_CLOSE_WAIT:
- case TCP_CLOSE:
- rds_conn_drop(conn);
- default:
- break;
+ switch (sk->sk_state) {
+ /* ignore connecting sockets as they make progress */
+ case TCP_SYN_SENT:
+ case TCP_SYN_RECV:
+ break;
+ case TCP_ESTABLISHED:
+ rds_connect_path_complete(conn, RDS_CONN_CONNECTING);
+ break;
+ case TCP_CLOSE_WAIT:
+ case TCP_CLOSE:
+ rds_conn_drop(conn);
+ default:
+ break;
}
out:
read_unlock_bh(&sk->sk_callback_lock);
diff --git a/net/rds/tcp_recv.c b/net/rds/tcp_recv.c
index c3196f9..6e6a711 100644
--- a/net/rds/tcp_recv.c
+++ b/net/rds/tcp_recv.c
@@ -171,7 +171,7 @@ static int rds_tcp_data_recv(read_descriptor_t *desc, struct sk_buff *skb,
while (left) {
if (!tinc) {
tinc = kmem_cache_alloc(rds_tcp_incoming_slab,
- arg->gfp);
+ arg->gfp);
if (!tinc) {
desc->error = -ENOMEM;
goto out;
diff --git a/net/rds/tcp_send.c b/net/rds/tcp_send.c
index 22d0f20..618be69 100644
--- a/net/rds/tcp_send.c
+++ b/net/rds/tcp_send.c
@@ -66,19 +66,19 @@ void rds_tcp_xmit_complete(struct rds_connection *conn)
static int rds_tcp_sendmsg(struct socket *sock, void *data, unsigned int len)
{
struct kvec vec = {
- .iov_base = data,
- .iov_len = len,
+ .iov_base = data,
+ .iov_len = len,
+ };
+ struct msghdr msg = {
+ .msg_flags = MSG_DONTWAIT | MSG_NOSIGNAL,
};
- struct msghdr msg = {
- .msg_flags = MSG_DONTWAIT | MSG_NOSIGNAL,
- };
return kernel_sendmsg(sock, &msg, &vec, 1, vec.iov_len);
}
/* the core send_sem serializes this with other xmit and shutdown */
int rds_tcp_xmit(struct rds_connection *conn, struct rds_message *rm,
- unsigned int hdr_off, unsigned int sg, unsigned int off)
+ unsigned int hdr_off, unsigned int sg, unsigned int off)
{
struct rds_tcp_connection *tc = conn->c_transport_data;
int done = 0;
@@ -196,7 +196,7 @@ void rds_tcp_write_space(struct sock *sk)
tc->t_last_seen_una = rds_tcp_snd_una(tc);
rds_send_drop_acked(conn, rds_tcp_snd_una(tc), rds_tcp_is_acked);
- if ((atomic_read(&sk->sk_wmem_alloc) << 1) <= sk->sk_sndbuf)
+ if ((atomic_read(&sk->sk_wmem_alloc) << 1) <= sk->sk_sndbuf)
queue_delayed_work(rds_wq, &conn->c_send_w, 0);
out:
diff --git a/net/rds/transport.c b/net/rds/transport.c
index f3afd1d..2ffd3e30 100644
--- a/net/rds/transport.c
+++ b/net/rds/transport.c
@@ -140,8 +140,7 @@ unsigned int rds_trans_stats_info_copy(struct rds_info_iterator *iter,
rds_info_iter_unmap(iter);
down_read(&rds_trans_sem);
- for (i = 0; i < RDS_TRANS_COUNT; i++)
- {
+ for (i = 0; i < RDS_TRANS_COUNT; i++) {
trans = transports[i];
if (!trans || !trans->stats_info_copy)
continue;
--
2.8.3
[toc] | [next] | [standalone]
| From | "santosh.shilimkar@oracle.com" <santosh.shilimkar@oracle.com> |
|---|---|
| Date | 2016-06-18 18:30 +0200 |
| Message-ID | <rLrid-6py-103@gated-at.bofh.it> |
| In reply to | #1425739 |
On 6/18/16 8:46 AM, Joshua Houghton wrote: > Fix coding style issues in the following files: > > ib_cm.c: add space > loop.c: convert spaces to tabs > sysctl.c: add space > tcp.h: convert spaces to tabs > tcp_connect.c:remove extra indentation in switch statement > tcp_recv.c: convert spaces to tabs > tcp_send.c: convert spaces to tabs > transport.c: move brace up one line on for statement > > Signed-off-by: Joshua Houghton <josh@awful.name> > --- Thanks for doing it. Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
[toc] | [prev] | [next] | [standalone]
| From | Joshua Houghton <josh@awful.name> |
|---|---|
| Date | 2016-06-18 19:10 +0200 |
| Message-ID | <rLrUR-6T6-7@gated-at.bofh.it> |
| In reply to | #1425787 |
On Saturday, 18 June 2016 09:22:49 UTC santosh.shilimkar@oracle.com wrote: > On 6/18/16 8:46 AM, Joshua Houghton wrote: > > Fix coding style issues in the following files: > > > > ib_cm.c: add space > > loop.c: convert spaces to tabs > > sysctl.c: add space > > tcp.h: convert spaces to tabs > > tcp_connect.c:remove extra indentation in switch statement > > tcp_recv.c: convert spaces to tabs > > tcp_send.c: convert spaces to tabs > > transport.c: move brace up one line on for statement > > > > Signed-off-by: Joshua Houghton <josh@awful.name> > > --- > > Thanks for doing it. > Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Your welcome. :)
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-06-19 06:40 +0200 |
| Message-ID | <rLCGB-5Fx-3@gated-at.bofh.it> |
| In reply to | #1425739 |
From: Joshua Houghton <josh@awful.name> Date: Sat, 18 Jun 2016 15:46:31 +0000 > Fix coding style issues in the following files: > > ib_cm.c: add space > loop.c: convert spaces to tabs > sysctl.c: add space > tcp.h: convert spaces to tabs > tcp_connect.c:remove extra indentation in switch statement > tcp_recv.c: convert spaces to tabs > tcp_send.c: convert spaces to tabs > transport.c: move brace up one line on for statement > > Signed-off-by: Joshua Houghton <josh@awful.name> Applied.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web