staging: lustre: ptlrpc: fix indentation
authorKristina Martsenko <kristina.martsenko@gmail.com>
Mon, 11 Nov 2013 19:35:03 +0000 (21:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Nov 2013 09:37:21 +0000 (18:37 +0900)
Fix the following type of checkpatch warning to comply with coding
style:
WARNING: suspect code indent for conditional statements

Also join a debug string split across lines, as it was on the same lines
as the other changes anyway. And reformat some comments in the kernel
coding style for the same reason.

Signed-off-by: Kristina Martsenko <kristina.martsenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ptlrpc/import.c
drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
drivers/staging/lustre/lustre/ptlrpc/service.c

index ac8813e4ce2d282590b941afecd797f2d5f213ad..283173a2fe2334fcf44165e0d7fc9d31bea59f71 100644 (file)
@@ -72,15 +72,15 @@ static void __import_set_state(struct obd_import *imp,
 }
 
 /* A CLOSED import should remain so. */
-#define IMPORT_SET_STATE_NOLOCK(imp, state)                                \
-do {                                                                      \
-       if (imp->imp_state != LUSTRE_IMP_CLOSED) {                           \
-              CDEBUG(D_HA, "%p %s: changing import state from %s to %s\n",    \
-                     imp, obd2cli_tgt(imp->imp_obd),                     \
-                     ptlrpc_import_state_name(imp->imp_state),         \
-                     ptlrpc_import_state_name(state));                 \
-              __import_set_state(imp, state);                           \
-       }                                                                     \
+#define IMPORT_SET_STATE_NOLOCK(imp, state)                                   \
+do {                                                                          \
+       if (imp->imp_state != LUSTRE_IMP_CLOSED) {                             \
+               CDEBUG(D_HA, "%p %s: changing import state from %s to %s\n",   \
+                      imp, obd2cli_tgt(imp->imp_obd),                         \
+                      ptlrpc_import_state_name(imp->imp_state),               \
+                      ptlrpc_import_state_name(state));                       \
+               __import_set_state(imp, state);                                \
+       }                                                                      \
 } while (0)
 
 #define IMPORT_SET_STATE(imp, state)                                   \
@@ -1135,9 +1135,11 @@ out:
                        if (ocd &&
                            (ocd->ocd_connect_flags & OBD_CONNECT_VERSION) &&
                            (ocd->ocd_version != LUSTRE_VERSION_CODE)) {
-                          /* Actually servers are only supposed to refuse
-                             connection from liblustre clients, so we should
-                             never see this from VFS context */
+                               /*
+                                * Actually servers are only supposed to refuse
+                                * connection from liblustre clients, so we
+                                * should never see this from VFS context
+                                */
                                LCONSOLE_ERROR_MSG(0x16a, "Server %s version "
                                        "(%d.%d.%d.%d)"
                                        " refused connection from this client "
index 94abb51cf642e642975b9a65915f6720d10d65e5..4659314a186522719decbfa805ced7b1c945434e 100644 (file)
@@ -636,8 +636,8 @@ static inline int lustre_unpack_ptlrpc_body_v2(struct ptlrpc_request *req,
        }
 
        if ((pb->pb_version & ~LUSTRE_VERSION_MASK) != PTLRPC_MSG_VERSION) {
-                CERROR("wrong lustre_msg version %08x\n", pb->pb_version);
-                return -EINVAL;
+               CERROR("wrong lustre_msg version %08x\n", pb->pb_version);
+               return -EINVAL;
        }
 
        if (!inout)
index 544a030a2a2ed6f3aaee409ec1142d7c0cc40fd8..2b10d6dea2d9afca1506f94d55912a18912a6c8e 100644 (file)
@@ -1115,8 +1115,10 @@ static int ptlrpc_check_req(struct ptlrpc_request *req)
        }
        if (unlikely(req->rq_export->exp_obd &&
                     req->rq_export->exp_obd->obd_fail)) {
-            /* Failing over, don't handle any more reqs, send
-               error response instead. */
+               /*
+                * Failing over, don't handle any more reqs, send
+                * error response instead.
+                */
                CDEBUG(D_RPCTRACE, "Dropping req %p for failed obd %s\n",
                       req, req->rq_export->exp_obd->obd_name);
                rc = -ENODEV;
@@ -1967,13 +1969,14 @@ put_conn:
        lu_context_fini(&request->rq_session);
 
        if (unlikely(cfs_time_current_sec() > request->rq_deadline)) {
-                    DEBUG_REQ(D_WARNING, request, "Request took longer "
-                              "than estimated ("CFS_DURATION_T":"CFS_DURATION_T"s);"
-                              " client may timeout.",
-                              cfs_time_sub(request->rq_deadline,
-                                           request->rq_arrival_time.tv_sec),
-                              cfs_time_sub(cfs_time_current_sec(),
-                                           request->rq_deadline));
+               DEBUG_REQ(D_WARNING, request,
+                         "Request took longer than estimated ("
+                               CFS_DURATION_T":"CFS_DURATION_T
+                               "s); client may timeout.",
+                         cfs_time_sub(request->rq_deadline,
+                                      request->rq_arrival_time.tv_sec),
+                         cfs_time_sub(cfs_time_current_sec(),
+                                      request->rq_deadline));
        }
 
        do_gettimeofday(&work_end);