staging: lustre: ptlrpc: clean up whitespace around braces
authorKristina Martsenko <kristina.martsenko@gmail.com>
Mon, 11 Nov 2013 19:34:59 +0000 (21:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Nov 2013 09:33:38 +0000 (18:33 +0900)
Fix the following types of checkpatch errors to comply with coding
style:

ERROR: space required after that close brace '}'
ERROR: space required before the open brace '{'

Also change "if (x == 0)" into "if (!x)" on one line, to avoid
introducing new checkpatch issues.

Signed-off-by: Kristina Martsenko <kristina.martsenko@gmail.com>
Reviewed-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ptlrpc/client.c
drivers/staging/lustre/lustre/ptlrpc/gss/sec_gss.c
drivers/staging/lustre/lustre/ptlrpc/niobuf.c
drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h
drivers/staging/lustre/lustre/ptlrpc/service.c

index 07d34b4a074e3a77eba4533e7bccd8db3a17d2dd..a5b5caabf2e8283bbf1aeb96096b897f5b94037f 100644 (file)
@@ -1596,7 +1596,8 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set)
                                        continue;
 
                                spin_lock(&imp->imp_lock);
-                               if (ptlrpc_import_delay_req(imp, req, &status)){
+                               if (ptlrpc_import_delay_req(imp, req,
+                                                           &status)) {
                                        /* put on delay list - only if we wait
                                         * recovery finished - before send */
                                        list_del_init(&req->rq_list);
index 92543f81eacfbd2c7f01808eb5d8cabc583c9886..8ce6271a5daa53320355364c106e5dc86ffd81ef 100644 (file)
@@ -804,7 +804,8 @@ int gss_cli_ctx_verify(struct ptlrpc_cli_ctx *ctx,
        case PTLRPC_GSS_PROC_DATA:
                pack_bulk = ghdr->gh_flags & LUSTRE_GSS_PACK_BULK;
 
-               if (!req->rq_early && !equi(req->rq_pack_bulk == 1, pack_bulk)){
+               if (!req->rq_early &&
+                   !equi(req->rq_pack_bulk == 1, pack_bulk)) {
                        CERROR("%s bulk flag in reply\n",
                               req->rq_pack_bulk ? "missing" : "unexpected");
                        return -EPROTO;
@@ -1009,7 +1010,8 @@ int gss_cli_ctx_unseal(struct ptlrpc_cli_ctx *ctx,
        case PTLRPC_GSS_PROC_DATA:
                pack_bulk = ghdr->gh_flags & LUSTRE_GSS_PACK_BULK;
 
-               if (!req->rq_early && !equi(req->rq_pack_bulk == 1, pack_bulk)){
+               if (!req->rq_early &&
+                   !equi(req->rq_pack_bulk == 1, pack_bulk)) {
                        CERROR("%s bulk flag in reply\n",
                               req->rq_pack_bulk ? "missing" : "unexpected");
                        return -EPROTO;
@@ -1979,7 +1981,7 @@ int gss_svc_handle_init(struct ptlrpc_request *req,
                return SECSVC_DROP;
        }
 
-       if (reqbuf->lm_bufcount < 3 || reqbuf->lm_bufcount > 4){
+       if (reqbuf->lm_bufcount < 3 || reqbuf->lm_bufcount > 4) {
                CERROR("Invalid bufcount %d\n", reqbuf->lm_bufcount);
                return SECSVC_DROP;
        }
index 6eb06ed8b5ada3fbada1d2da5b98e4d26e9b912f..9b18b68ba1fefa415a6edf6d787488d764b830d5 100644 (file)
@@ -66,7 +66,8 @@ static int ptl_send_buf(lnet_handle_md_t *mdh, void *base, int len,
        md.eq_handle = ptlrpc_eq_h;
 
        if (unlikely(ack == LNET_ACK_REQ &&
-                    OBD_FAIL_CHECK_ORSET(OBD_FAIL_PTLRPC_ACK, OBD_FAIL_ONCE))){
+                    OBD_FAIL_CHECK_ORSET(OBD_FAIL_PTLRPC_ACK,
+                                         OBD_FAIL_ONCE))) {
                /* don't ask for the ack to simulate failing client */
                ack = LNET_NOACK_REQ;
        }
index 9bd3f84b33b7e597c4424005feb44ca90816293c..5d0749cc4b0f7223481ab281f427c1a398ec7bf2 100644 (file)
@@ -80,10 +80,10 @@ void ptlrpc_lprocfs_rpc_sent(struct ptlrpc_request *req, long amount);
 void ptlrpc_lprocfs_do_request_stat(struct ptlrpc_request *req,
                                     long q_usec, long work_usec);
 #else
-#define ptlrpc_lprocfs_register_service(params...) do{}while (0)
-#define ptlrpc_lprocfs_unregister_service(params...) do{}while (0)
-#define ptlrpc_lprocfs_rpc_sent(params...) do{}while (0)
-#define ptlrpc_lprocfs_do_request_stat(params...) do{}while (0)
+#define ptlrpc_lprocfs_register_service(params...) do {} while (0)
+#define ptlrpc_lprocfs_unregister_service(params...) do {} while (0)
+#define ptlrpc_lprocfs_rpc_sent(params...) do {} while (0)
+#define ptlrpc_lprocfs_do_request_stat(params...) do {} while (0)
 #endif /* LPROCFS */
 
 /* NRS */
index b21ea83e75cd47d117cbffb0a9e1424491b55546..544a030a2a2ed6f3aaee409ec1142d7c0cc40fd8 100644 (file)
@@ -1268,7 +1268,7 @@ static int ptlrpc_at_send_early_reply(struct ptlrpc_request *req)
                return -ETIMEDOUT;
        }
 
-       if ((lustre_msghdr_get_flags(req->rq_reqmsg) & MSGHDR_AT_SUPPORT) == 0){
+       if (!(lustre_msghdr_get_flags(req->rq_reqmsg) & MSGHDR_AT_SUPPORT)) {
                DEBUG_REQ(D_INFO, req, "Wanted to ask client for more time, "
                          "but no AT support");
                return -ENOSYS;