staging: lustre: balance braces properly in LNet layer
authorJames Simmons <jsimmons@infradead.org>
Fri, 12 Feb 2016 17:06:07 +0000 (12:06 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Feb 2016 00:20:32 +0000 (16:20 -0800)
Properly balance the braces done wrong as reported by
checkpatch.pl.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c
drivers/staging/lustre/lnet/lnet/nidstrings.c
drivers/staging/lustre/lnet/lnet/router_proc.c
drivers/staging/lustre/lnet/selftest/console.c
drivers/staging/lustre/lnet/selftest/selftest.h

index 14938c36174183401852e07efb3417996c1ae561..d9c708987ddf1b45b7cd6c224f0836caeaa2410b 100644 (file)
@@ -951,8 +951,9 @@ kiblnd_check_sends(kib_conn_t *conn)
                        credit = 1;
                        tx = list_entry(conn->ibc_tx_queue.next,
                                        kib_tx_t, tx_list);
-               } else
+               } else {
                        break;
+               }
 
                if (kiblnd_post_tx_locked(conn, tx, credit) != 0)
                        break;
index 37df8a920e5448273781cf3ff1da601e0515319a..db5662b13b20554571962a8eab1e05c91ab07a9c 100644 (file)
@@ -609,8 +609,9 @@ ksocknal_data_ready(struct sock *sk)
        if (conn == NULL) {          /* raced with ksocknal_terminate_conn */
                LASSERT(sk->sk_data_ready != &ksocknal_data_ready);
                sk->sk_data_ready(sk);
-       } else
+       } else {
                ksocknal_read_callback(conn);
+       }
 
        read_unlock(&ksocknal_data.ksnd_global_lock);
 }
index f84d1aed95641d6f73484c40e80525299c2c62f2..041f97272ec387256cb7285a4de420eefe01865a 100644 (file)
@@ -507,9 +507,8 @@ ksocknal_send_hello_v1(ksock_conn_t *conn, ksock_hello_msg_t *hello)
        if (hello->kshm_nips == 0)
                goto out;
 
-       for (i = 0; i < (int) hello->kshm_nips; i++) {
+       for (i = 0; i < (int) hello->kshm_nips; i++)
                hello->kshm_ips[i] = __cpu_to_le32(hello->kshm_ips[i]);
-       }
 
        rc = lnet_sock_write(sock, hello->kshm_ips,
                             hello->kshm_nips * sizeof(__u32),
index 449efc7b49ca85df2b9a3559f8a8edafbdf931b0..d7c983644ff0877c2ea3ca6f7c48318de09951c0 100644 (file)
@@ -1139,9 +1139,9 @@ libcfs_nid2str_r(lnet_nid_t nid, char *buf, size_t buf_size)
        }
 
        nf = libcfs_lnd2netstrfns(lnd);
-       if (nf == NULL)
+       if (nf == NULL) {
                snprintf(buf, buf_size, "%x@<%u:%u>", addr, lnd, nnum);
-       else {
+       else {
                size_t addr_len;
 
                nf->nf_addr2str(addr, buf, buf_size);
index 4a5067c43f1ba31231087f0ff7ff874e584af76a..124737e8a4ae94d3d908cf1a5331ece4e52fd90d 100644 (file)
@@ -262,9 +262,9 @@ static int proc_lnet_routes(struct ctl_table *table, int write,
        if (len > *lenp) {    /* linux-supplied buffer is too small */
                rc = -EINVAL;
        } else if (len > 0) { /* wrote something */
-               if (copy_to_user(buffer, tmpstr, len))
+               if (copy_to_user(buffer, tmpstr, len)) {
                        rc = -EFAULT;
-               else {
+               else {
                        off += 1;
                        *ppos = LNET_PROC_POS_MAKE(0, ver, 0, off);
                }
@@ -399,9 +399,9 @@ static int proc_lnet_routers(struct ctl_table *table, int write,
        if (len > *lenp) {    /* linux-supplied buffer is too small */
                rc = -EINVAL;
        } else if (len > 0) { /* wrote something */
-               if (copy_to_user(buffer, tmpstr, len))
+               if (copy_to_user(buffer, tmpstr, len)) {
                        rc = -EFAULT;
-               else {
+               else {
                        off += 1;
                        *ppos = LNET_PROC_POS_MAKE(0, ver, 0, off);
                }
index ab0a3f7cf3668973c65c6049fb4fe3dfc49fe3a1..914d842929a71d230e19577c00a96b983c61e2e9 100644 (file)
@@ -254,9 +254,8 @@ lstcon_group_decref(lstcon_group_t *grp)
 
        lstcon_group_drain(grp, 0);
 
-       for (i = 0; i < LST_NODE_HASHSIZE; i++) {
+       for (i = 0; i < LST_NODE_HASHSIZE; i++)
                LASSERT(list_empty(&grp->grp_ndl_hash[i]));
-       }
 
        LIBCFS_FREE(grp, offsetof(lstcon_group_t,
                                  grp_ndl_hash[LST_NODE_HASHSIZE]));
@@ -2084,9 +2083,8 @@ lstcon_console_fini(void)
        LASSERT(list_empty(&console_session.ses_bat_list));
        LASSERT(list_empty(&console_session.ses_trans_list));
 
-       for (i = 0; i < LST_NODE_HASHSIZE; i++) {
+       for (i = 0; i < LST_NODE_HASHSIZE; i++)
                LASSERT(list_empty(&console_session.ses_ndl_hash[i]));
-       }
 
        LIBCFS_FREE(console_session.ses_ndl_hash,
                    sizeof(struct list_head) * LST_GLOBAL_HASHSIZE);
index 5c299d6aa2ce2791ecf3bc0b527bbc939d5bc3e2..906e26abcd0eecb8fb099263f6caca33ee4bceb8 100644 (file)
@@ -508,11 +508,10 @@ srpc_destroy_client_rpc(srpc_client_rpc_t *rpc)
        LASSERT(!srpc_event_pending(rpc));
        LASSERT(atomic_read(&rpc->crpc_refcount) == 0);
 
-       if (rpc->crpc_fini == NULL) {
+       if (rpc->crpc_fini == NULL)
                LIBCFS_FREE(rpc, srpc_client_rpc_size(rpc));
-       } else {
+       else
                (*rpc->crpc_fini) (rpc);
-       }
 
        return;
 }
This page took 0.038647 seconds and 5 git commands to generate.