staging: lustre: ptlrpc: clean up whitespace and align function params
[cascardo/linux.git] / drivers / staging / lustre / lustre / ptlrpc / llog_client.c
index e9baf5b..1c701e0 100644 (file)
 #include "../include/lustre_net.h"
 #include <linux/list.h>
 
-#define LLOG_CLIENT_ENTRY(ctxt, imp) do {                           \
-       mutex_lock(&ctxt->loc_mutex);                        \
-       if (ctxt->loc_imp) {                                      \
-               imp = class_import_get(ctxt->loc_imp);          \
-       } else {                                                      \
-               CERROR("ctxt->loc_imp == NULL for context idx %d."    \
-                      "Unable to complete MDS/OSS recovery,"    \
-                      "but I'll try again next time.  Not fatal.\n", \
-                      ctxt->loc_idx);                          \
-               imp = NULL;                                        \
-               mutex_unlock(&ctxt->loc_mutex);            \
-               return (-EINVAL);                                    \
-       }                                                            \
-       mutex_unlock(&ctxt->loc_mutex);                    \
+#define LLOG_CLIENT_ENTRY(ctxt, imp) do {                              \
+       mutex_lock(&ctxt->loc_mutex);                                   \
+       if (ctxt->loc_imp) {                                            \
+               imp = class_import_get(ctxt->loc_imp);                  \
+       } else {                                                        \
+               CERROR("ctxt->loc_imp == NULL for context idx %d."      \
+                      "Unable to complete MDS/OSS recovery,"           \
+                      "but I'll try again next time.  Not fatal.\n",   \
+                      ctxt->loc_idx);                                  \
+               imp = NULL;                                             \
+               mutex_unlock(&ctxt->loc_mutex);                         \
+               return (-EINVAL);                                       \
+       }                                                               \
+       mutex_unlock(&ctxt->loc_mutex);                                 \
 } while (0)
 
-#define LLOG_CLIENT_EXIT(ctxt, imp) do {                             \
-       mutex_lock(&ctxt->loc_mutex);                        \
-       if (ctxt->loc_imp != imp)                                    \
-               CWARN("loc_imp has changed from %p to %p\n",      \
-                      ctxt->loc_imp, imp);                        \
-       class_import_put(imp);                                  \
-       mutex_unlock(&ctxt->loc_mutex);                    \
+#define LLOG_CLIENT_EXIT(ctxt, imp) do {                               \
+       mutex_lock(&ctxt->loc_mutex);                                   \
+       if (ctxt->loc_imp != imp)                                       \
+               CWARN("loc_imp has changed from %p to %p\n",            \
+                      ctxt->loc_imp, imp);                             \
+       class_import_put(imp);                                          \
+       mutex_unlock(&ctxt->loc_mutex);                                 \
 } while (0)
 
 /* This is a callback from the llog_* functions.
@@ -80,11 +80,11 @@ static int llog_client_open(const struct lu_env *env,
                            struct llog_handle *lgh, struct llog_logid *logid,
                            char *name, enum llog_open_param open_param)
 {
-       struct obd_import     *imp;
-       struct llogd_body     *body;
-       struct llog_ctxt      *ctxt = lgh->lgh_ctxt;
+       struct obd_import *imp;
+       struct llogd_body *body;
+       struct llog_ctxt *ctxt = lgh->lgh_ctxt;
        struct ptlrpc_request *req = NULL;
-       int                 rc;
+       int rc;
 
        LLOG_CLIENT_ENTRY(ctxt, imp);
 
@@ -145,10 +145,10 @@ out:
 static int llog_client_destroy(const struct lu_env *env,
                               struct llog_handle *loghandle)
 {
-       struct obd_import     *imp;
+       struct obd_import *imp;
        struct ptlrpc_request *req = NULL;
-       struct llogd_body     *body;
-       int                 rc;
+       struct llogd_body *body;
+       int rc;
 
        LLOG_CLIENT_ENTRY(loghandle->lgh_ctxt, imp);
        req = ptlrpc_request_alloc_pack(imp, &RQF_LLOG_ORIGIN_HANDLE_DESTROY,
@@ -182,11 +182,11 @@ static int llog_client_next_block(const struct lu_env *env,
                                  int *cur_idx, int next_idx,
                                  __u64 *cur_offset, void *buf, int len)
 {
-       struct obd_import     *imp;
+       struct obd_import *imp;
        struct ptlrpc_request *req = NULL;
-       struct llogd_body     *body;
-       void              *ptr;
-       int                 rc;
+       struct llogd_body *body;
+       void *ptr;
+       int rc;
 
        LLOG_CLIENT_ENTRY(loghandle->lgh_ctxt, imp);
        req = ptlrpc_request_alloc_pack(imp, &RQF_LLOG_ORIGIN_HANDLE_NEXT_BLOCK,
@@ -240,11 +240,11 @@ static int llog_client_prev_block(const struct lu_env *env,
                                  struct llog_handle *loghandle,
                                  int prev_idx, void *buf, int len)
 {
-       struct obd_import     *imp;
+       struct obd_import *imp;
        struct ptlrpc_request *req = NULL;
-       struct llogd_body     *body;
-       void              *ptr;
-       int                 rc;
+       struct llogd_body *body;
+       void *ptr;
+       int rc;
 
        LLOG_CLIENT_ENTRY(loghandle->lgh_ctxt, imp);
        req = ptlrpc_request_alloc_pack(imp, &RQF_LLOG_ORIGIN_HANDLE_PREV_BLOCK,
@@ -292,12 +292,12 @@ err_exit:
 static int llog_client_read_header(const struct lu_env *env,
                                   struct llog_handle *handle)
 {
-       struct obd_import     *imp;
+       struct obd_import *imp;
        struct ptlrpc_request *req = NULL;
-       struct llogd_body     *body;
-       struct llog_log_hdr   *hdr;
-       struct llog_rec_hdr   *llh_hdr;
-       int                 rc;
+       struct llogd_body *body;
+       struct llog_log_hdr *hdr;
+       struct llog_rec_hdr *llh_hdr;
+       int rc;
 
        LLOG_CLIENT_ENTRY(handle->lgh_ctxt, imp);
        req = ptlrpc_request_alloc_pack(imp, &RQF_LLOG_ORIGIN_HANDLE_READ_HEADER,