All of lore.kernel.org
 help / color / mirror / Atom feed
From: Prarit Bhargava <prarit@redhat.com>
To: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com
Cc: Prarit Bhargava <prarit@redhat.com>
Subject: [PATCH]: mutex: Fix !CONFIG_MUTEX_SPIN_ON_OWNER compile warning
Date: Thu, 27 May 2010 15:07:40 -0400	[thread overview]
Message-ID: <20100527190336.24665.22701.sendpatchset@prarit.bos.redhat.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 731 bytes --]

Fixes linux-next !CONFIG_MUTEX_SPIN_ON_OWNER compile warning:

kernel/mutex.c: In function ‘__mutex_lock_common’:
kernel/mutex.c:148: error: unused variable ‘timeout’

timeout is only used if CONFIG_MUTEX_SPIN_ON_OWNER is on.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>

diff --git a/kernel/mutex.c b/kernel/mutex.c
index 7d4626b..c262942 100644
--- a/kernel/mutex.c
+++ b/kernel/mutex.c
@@ -145,7 +145,9 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
 	struct task_struct *task = current;
 	struct mutex_waiter waiter;
 	unsigned long flags;
+#ifdef CONFIG_MUTEX_SPIN_ON_OWNER
 	unsigned long timeout;
+#endif
 
 	preempt_disable();
 	mutex_acquire(&lock->dep_map, subclass, 0, ip);

             reply	other threads:[~2010-05-27 19:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-27 19:07 Prarit Bhargava [this message]
2010-05-27 19:16 ` [PATCH]: mutex: Fix !CONFIG_MUTEX_SPIN_ON_OWNER compile warning Frederic Weisbecker
2010-05-27 22:40 ` Frederic Weisbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100527190336.24665.22701.sendpatchset@prarit.bos.redhat.com \
    --to=prarit@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.