]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: lustre: ldlm: Add missing newlines after declarations
authorAndreas Ruprecht <rupran@einserver.de>
Sun, 23 Nov 2014 13:37:48 +0000 (14:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Nov 2014 20:49:32 +0000 (12:49 -0800)
checkpatch.pl complains about a number of missing newlines after
declarations. This patch gets rid of these warnings.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ldlm/interval_tree.c
drivers/staging/lustre/lustre/ldlm/ldlm_extent.c
drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
drivers/staging/lustre/lustre/ldlm/ldlm_internal.h
drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
drivers/staging/lustre/lustre/ldlm/ldlm_request.c
drivers/staging/lustre/lustre/ldlm/ldlm_resource.c

index a3d7a7292417ca73c9292f0930ea1a8dff45ae39..eab2bd60241b4bafac30a3e38261464a109b9fda 100644 (file)
@@ -73,6 +73,7 @@ static inline int extent_compare(struct interval_node_extent *e1,
                                 struct interval_node_extent *e2)
 {
        int rc;
+
        if (e1->start == e2->start) {
                if (e1->end < e2->end)
                        rc = -1;
@@ -321,6 +322,7 @@ static void interval_insert_color(struct interval_node *node,
                /* Parent is RED, so gparent must not be NULL */
                if (node_is_left_child(parent)) {
                        struct interval_node *uncle;
+
                        uncle = gparent->in_right;
                        if (uncle && node_is_red(uncle)) {
                                uncle->in_color = INTERVAL_BLACK;
@@ -340,6 +342,7 @@ static void interval_insert_color(struct interval_node *node,
                        __rotate_right(gparent, root);
                } else {
                        struct interval_node *uncle;
+
                        uncle = gparent->in_left;
                        if (uncle && node_is_red(uncle)) {
                                uncle->in_color = INTERVAL_BLACK;
@@ -427,6 +430,7 @@ static void interval_erase_color(struct interval_node *node,
                        } else {
                                if (node_is_black_or_0(tmp->in_right)) {
                                        struct interval_node *o_left;
+
                                        o_left = tmp->in_left;
                                        if (o_left)
                                                o_left->in_color = INTERVAL_BLACK;
@@ -458,6 +462,7 @@ static void interval_erase_color(struct interval_node *node,
                        } else {
                                if (node_is_black_or_0(tmp->in_left)) {
                                        struct interval_node *o_right;
+
                                        o_right = tmp->in_right;
                                        if (o_right)
                                                o_right->in_color = INTERVAL_BLACK;
index 0c09b611f4a6349ff17f68abd9a237be7fed05c7..a89eebaedabfe54fa9391fcc531ea88f42f8d9b1 100644 (file)
@@ -182,7 +182,9 @@ void ldlm_extent_add_lock(struct ldlm_resource *res,
        root = &res->lr_itree[idx].lit_root;
        found = interval_insert(&node->li_node, root);
        if (found) { /* The policy group found. */
-               struct ldlm_interval *tmp = ldlm_interval_detach(lock);
+               struct ldlm_interval *tmp;
+
+               tmp = ldlm_interval_detach(lock);
                LASSERT(tmp != NULL);
                ldlm_interval_free(tmp);
                ldlm_interval_attach(to_ldlm_interval(found), lock);
index e00478b9b50b14a54f9a0a56db5efdf4ad93db83..efb36354150f09d550eeb93dfc3c18fd741878cf 100644 (file)
@@ -291,6 +291,7 @@ reprocess:
                }
        } else {
                int reprocess_failed = 0;
+
                lockmode_verify(mode);
 
                /* This loop determines if there are existing locks
index 06cf6d282e653de490ed7118960a359fa768ef02..b3009cc1ad9cb192022f4139dae447892a0737ca 100644 (file)
@@ -214,6 +214,7 @@ static inline struct ldlm_extent *
 ldlm_interval_extent(struct ldlm_interval *node)
 {
        struct ldlm_lock *lock;
+
        LASSERT(!list_empty(&node->li_group));
 
        lock = list_entry(node->li_group.next, struct ldlm_lock,
index 2c4af89eee7ea5f93deade0a5cce8c9ea3bfeda9..c0e54898a2e105af2ad009b40763650478598af3 100644 (file)
@@ -226,6 +226,7 @@ EXPORT_SYMBOL(ldlm_lock_put);
 int ldlm_lock_remove_from_lru_nolock(struct ldlm_lock *lock)
 {
        int rc = 0;
+
        if (!list_empty(&lock->l_lru)) {
                struct ldlm_namespace *ns = ldlm_lock_to_ns(lock);
 
@@ -858,6 +859,7 @@ void ldlm_lock_decref_internal(struct ldlm_lock *lock, __u32 mode)
 void ldlm_lock_decref(struct lustre_handle *lockh, __u32 mode)
 {
        struct ldlm_lock *lock = __ldlm_handle2lock(lockh, 0);
+
        LASSERTF(lock != NULL, "Non-existing lock: %#llx\n", lockh->cookie);
        ldlm_lock_decref_internal(lock, mode);
        LDLM_LOCK_PUT(lock);
@@ -1286,6 +1288,7 @@ ldlm_mode_t ldlm_lock_match(struct ldlm_namespace *ns, __u64 flags,
                        __u64 wait_flags = LDLM_FL_LVB_READY |
                                LDLM_FL_DESTROYED | LDLM_FL_FAIL_NOTIFIED;
                        struct l_wait_info lwi;
+
                        if (lock->l_completion_ast) {
                                int err = lock->l_completion_ast(lock,
                                                          LDLM_FL_WAIT_NOREPROC,
@@ -2219,6 +2222,7 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,
                nid = libcfs_nid2str(exp->exp_connection->c_peer.nid);
        } else if (exp && exp->exp_obd != NULL) {
                struct obd_import *imp = exp->exp_obd->u.cli.cl_import;
+
                nid = libcfs_nid2str(imp->imp_connection->c_peer.nid);
        }
 
index 5fb9d842f7b94e0a8bb3852829bc9aab0efbddce..870dac1de484b58277a70f985c6cd179371b6cb2 100644 (file)
@@ -190,6 +190,7 @@ static void ldlm_handle_cp_callback(struct ptlrpc_request *req,
 
        if (OBD_FAIL_CHECK(OBD_FAIL_LDLM_CANCEL_BL_CB_RACE)) {
                int to = cfs_time_seconds(1);
+
                while (to > 0) {
                        set_current_state(TASK_INTERRUPTIBLE);
                        schedule_timeout(to);
@@ -884,6 +885,7 @@ void ldlm_put_ref(void)
        mutex_lock(&ldlm_ref_mutex);
        if (ldlm_refcount == 1) {
                int rc = ldlm_cleanup();
+
                if (rc)
                        CERROR("ldlm_cleanup failed: %d\n", rc);
                else
@@ -966,6 +968,7 @@ static cfs_hash_ops_t ldlm_export_lock_ops = {
 int ldlm_init_export(struct obd_export *exp)
 {
        int rc;
+
        exp->exp_lock_hash =
                cfs_hash_create(obd_uuid2str(&exp->exp_client_uuid),
                                HASH_EXP_LOCK_CUR_BITS,
index 0e1ab06d2543a98aed59b7062610e984dc1ba1b8..b0f06d8228e1f9a5a08cfc61a3b029ec5d467a0e 100644 (file)
@@ -943,6 +943,7 @@ EXPORT_SYMBOL(ldlm_pool_del);
 __u64 ldlm_pool_get_slv(struct ldlm_pool *pl)
 {
        __u64 slv;
+
        spin_lock(&pl->pl_lock);
        slv = pl->pl_server_lock_volume;
        spin_unlock(&pl->pl_lock);
@@ -971,6 +972,7 @@ EXPORT_SYMBOL(ldlm_pool_set_slv);
 __u64 ldlm_pool_get_clv(struct ldlm_pool *pl)
 {
        __u64 slv;
+
        spin_lock(&pl->pl_lock);
        slv = pl->pl_client_lock_volume;
        spin_unlock(&pl->pl_lock);
index 95e71a0922f33b9223c64291656175002f1547dc..292ac7a2d02a559049104ed0c29ac87f2d6dc86f 100644 (file)
@@ -135,6 +135,7 @@ EXPORT_SYMBOL(ldlm_expired_completion_wait);
 int ldlm_get_enq_timeout(struct ldlm_lock *lock)
 {
        int timeout = at_get(ldlm_lock_to_ns_at(lock));
+
        if (AT_OFF)
                return obd_timeout / 2;
        /* Since these are non-updating timeouts, we should be conservative.
@@ -601,6 +602,7 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req,
         * again. */
        if ((*flags) & LDLM_FL_LOCK_CHANGED) {
                int newmode = reply->lock_desc.l_req_mode;
+
                LASSERT(!is_replay);
                if (newmode && newmode != lock->l_req_mode) {
                        LDLM_DEBUG(lock, "server returned different mode %s",
@@ -669,6 +671,7 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req,
                rc = ldlm_lock_enqueue(ns, &lock, NULL, flags);
                if (lock->l_completion_ast != NULL) {
                        int err = lock->l_completion_ast(lock, *flags, NULL);
+
                        if (!rc)
                                rc = err;
                        if (rc)
@@ -718,6 +721,7 @@ static inline int ldlm_capsule_handles_avail(struct req_capsule *pill,
                                             int off)
 {
        int size = req_capsule_msg_size(pill, loc);
+
        return ldlm_req_handles_avail(size, off);
 }
 
@@ -726,6 +730,7 @@ static inline int ldlm_format_handles_avail(struct obd_import *imp,
                                            enum req_location loc, int off)
 {
        int size = req_capsule_fmt_size(imp->imp_msg_magic, fmt, loc);
+
        return ldlm_req_handles_avail(size, off);
 }
 
@@ -1407,6 +1412,7 @@ static ldlm_policy_res_t ldlm_cancel_no_wait_policy(struct ldlm_namespace *ns,
 {
        ldlm_policy_res_t result = LDLM_POLICY_CANCEL_LOCK;
        ldlm_cancel_for_recovery cb = ns->ns_cancel_for_recovery;
+
        lock_res_and_lock(lock);
 
        /* don't check added & count since we want to process all locks
@@ -1721,6 +1727,7 @@ int ldlm_cancel_lru_local(struct ldlm_namespace *ns, struct list_head *cancels,
                          int flags)
 {
        int added;
+
        added = ldlm_prepare_lru_list(ns, cancels, count, max, flags);
        if (added <= 0)
                return added;
@@ -2005,6 +2012,7 @@ struct iter_helper_data {
 static int ldlm_iter_helper(struct ldlm_lock *lock, void *closure)
 {
        struct iter_helper_data *helper = closure;
+
        return helper->iter(lock, helper->closure);
 }
 
index 397adbe3ce0e87d1f98d2f0977bd71bebb552b17..0fdbb9caa46e68b73c2a0ff0066cc2aa392bbded 100644 (file)
@@ -804,6 +804,7 @@ static int __ldlm_namespace_free(struct ldlm_namespace *ns, int force)
        if (atomic_read(&ns->ns_bref) > 0) {
                struct l_wait_info lwi = LWI_INTR(LWI_ON_SIGNAL_NOOP, NULL);
                int rc;
+
                CDEBUG(D_DLMTRACE,
                       "dlm namespace %s free waiting on refcount %d\n",
                       ldlm_ns_name(ns), atomic_read(&ns->ns_bref));
@@ -1332,6 +1333,7 @@ void ldlm_dump_all_namespaces(ldlm_side_t client, int level)
 
        list_for_each(tmp, ldlm_namespace_list(client)) {
                struct ldlm_namespace *ns;
+
                ns = list_entry(tmp, struct ldlm_namespace, ns_list_chain);
                ldlm_namespace_dump(level, ns);
        }