Skip to content

Commit

Permalink
mutex: Avoid label warning when !CONFIG_MUTEX_SPIN_ON_OWNER
Browse files Browse the repository at this point in the history
Fengguang reported the following warning when optimistic
spinning is disabled (ie: make allnoconfig):

   kernel/mutex.c:599:1: warning: label 'done' defined but not used

Remove the 'done' label altogether.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Davidlohr Bueso <davidlohr.bueso@hp.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Davidlohr Bueso authored and Ingo Molnar committed Jul 25, 2013
1 parent ec83f42 commit 2b48839
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/mutex.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,8 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,

mutex_set_owner(lock);
mspin_unlock(MLOCK(lock), &node);
goto done;
preempt_enable();
return 0;
}
mspin_unlock(MLOCK(lock), &node);

Expand Down Expand Up @@ -596,7 +597,6 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
}

spin_unlock_mutex(&lock->wait_lock, flags);
done:
preempt_enable();
return 0;

Expand Down

0 comments on commit 2b48839

Please sign in to comment.