Skip to content

Commit

Permalink
lockdep: Remove unnecessary 'hlock_next' variable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hong Zhiguo authored and Ingo Molnar committed Apr 8, 2013
1 parent 31880c3 commit bfaf4af
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions kernel/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down Expand Up @@ -2057,12 +2057,10 @@ static inline int lookup_chain_cache(struct task_struct *curr,
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;
Expand Down

0 comments on commit bfaf4af

Please sign in to comment.