From: Frederic Weisbecker <fweisbec@gmail.com>
To: Prarit Bhargava <prarit@redhat.com>
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com
Subject: Re: [PATCH]: mutex: Fix !CONFIG_MUTEX_SPIN_ON_OWNER compile warning
Date: Thu, 27 May 2010 21:16:31 +0200 [thread overview]
Message-ID: <20100527191628.GA5390@nowhere> (raw)
In-Reply-To: <20100527190336.24665.22701.sendpatchset@prarit.bos.redhat.com>
On Thu, May 27, 2010 at 03:07:40PM -0400, Prarit Bhargava wrote:
> 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
Andrew had a patch that fixed it with a "__used" tag.
Either way that doesn't look much proper.
It would be much nicer to put the mutex spinning in a separate
function, that would be a stub with !CONFIG_MUTEX_SPIN_ON_OWNER.
next prev parent reply other threads:[~2010-05-27 19:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-27 19:07 [PATCH]: mutex: Fix !CONFIG_MUTEX_SPIN_ON_OWNER compile warning Prarit Bhargava
2010-05-27 19:16 ` Frederic Weisbecker [this message]
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=20100527191628.GA5390@nowhere \
--to=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=prarit@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.