From d0bfef31f4d40888683e801dfd3f7448078d7e2b Mon Sep 17 00:00:00 2001 From: Chris Hanna Date: Wed, 3 Jun 2015 10:28:26 -0400 Subject: staging: lustre: ptlrpc: clean up whitespace and align function params Minor changes to remove excessive whitespace and improve readability of ptlrpc functions. Signed-off-by: Chris Hanna Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/ptlrpc/llog_client.c | 82 +++++++++++----------- 1 file changed, 41 insertions(+), 41 deletions(-) (limited to 'drivers/staging/lustre/lustre/ptlrpc/llog_client.c') diff --git a/drivers/staging/lustre/lustre/ptlrpc/llog_client.c b/drivers/staging/lustre/lustre/ptlrpc/llog_client.c index e9baf5bbee3a..1c701e0a0bc7 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/llog_client.c +++ b/drivers/staging/lustre/lustre/ptlrpc/llog_client.c @@ -49,29 +49,29 @@ #include "../include/lustre_net.h" #include -#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, -- cgit v1.2.3-59-g8ed1b