mutex: Avoid label warning when !CONFIG_MUTEX_SPIN_ON_OWNER
authorDavidlohr Bueso <davidlohr.bueso@hp.com>
Wed, 24 Jul 2013 18:25:17 +0000 (11:25 -0700)
committerIngo Molnar <mingo@kernel.org>
Thu, 25 Jul 2013 21:21:24 +0000 (23:21 +0200)
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>
kernel/mutex.c

index 386ad5da47a53fd145526ca97bbe49b8432cc608..98164a55a4dc677199418f8200701fca00ca824b 100644 (file)
@@ -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);
 
@@ -596,7 +597,6 @@ skip_wait:
        }
 
        spin_unlock_mutex(&lock->wait_lock, flags);
-done:
        preempt_enable();
        return 0;