]> Pileus Git - ~andy/linux/commitdiff
lockdep: Remove unnecessary 'hlock_next' variable
authorHong Zhiguo <honkiko@gmail.com>
Thu, 4 Apr 2013 07:01:21 +0000 (15:01 +0800)
committerIngo Molnar <mingo@kernel.org>
Mon, 8 Apr 2013 15:39:34 +0000 (17:39 +0200)
Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
Cc: peterz@infradead.org
Link: http://lkml.kernel.org/r/1365058881-4044-1-git-send-email-honkiko@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/lockdep.c

index 8a0efac4f99de7c5d0711bea6792db1f385f66eb..e5deddadeab1d0d9e8dd44d35627e7193e9c3fa6 100644 (file)
@@ -2000,7 +2000,7 @@ static inline int lookup_chain_cache(struct task_struct *curr,
        struct lock_class *class = hlock_class(hlock);
        struct list_head *hash_head = chainhashentry(chain_key);
        struct lock_chain *chain;
-       struct held_lock *hlock_curr, *hlock_next;
+       struct held_lock *hlock_curr;
        int i, j;
 
        /*
@@ -2057,12 +2057,10 @@ cache_hit:
        chain->chain_key = chain_key;
        chain->irq_context = hlock->irq_context;
        /* Find the first held_lock of current chain */
-       hlock_next = hlock;
        for (i = curr->lockdep_depth - 1; i >= 0; i--) {
                hlock_curr = curr->held_locks + i;
-               if (hlock_curr->irq_context != hlock_next->irq_context)
+               if (hlock_curr->irq_context != hlock->irq_context)
                        break;
-               hlock_next = hlock;
        }
        i++;
        chain->depth = curr->lockdep_depth + 1 - i;