All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Peter Zijlstra <peterz@infradead.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org>,
	akpm@linux-foundation.org, Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH] mutex: make mutex_lock_nested an inline function
Date: Wed, 14 Oct 2015 11:00:20 +0200	[thread overview]
Message-ID: <11240940.NHO2vFoJOz@wuerfel> (raw)
In-Reply-To: <20151014083707.GR11639@twins.programming.kicks-ass.net>

On Wednesday 14 October 2015 10:37:07 Peter Zijlstra wrote:
> On Wed, Oct 14, 2015 at 10:20:50AM +0200, Peter Zijlstra wrote:
> > > > On Tue, Oct 13, 2015 at 10:30:08PM +0200, Arnd Bergmann wrote:
> > > > > The second argument of the mutex_lock_nested() helper is only
> > > > > evaluated if CONFIG_DEBUG_LOCK_ALLOC is set. Otherwise we
> > > > > get this build warning for the new regulator_lock_supply
> > > > > function:
> > > > > 
> > > > > drivers/regulator/core.c: In function 'regulator_lock_supply':
> > > > > drivers/regulator/core.c:142:6: warning: unused variable 'i' [-Wunused-variable]
> > > > > 
> > > > > To avoid the warning, this patch changes the definition of
> > > > > mutex_lock_nested() to be static inline function rather than
> > > > > a macro, which tells gcc that the variable is potentially
> > > > > used.
> > 
> > Uuh, I just looked at next and saw this regulator_lock_supply()
> > function. How is that limited? subclass must be <8 otherwise bad things
> > happen.
> 
> Also, the function appears unused, just delete it 

That was my first suggestion as well when I ran into 

drivers/regulator/core.c:139:13: warning: 'regulator_lock_supply' defined but not used

but apparently this is work-in-progress and the plan is to use it
in 4.4 when the rest of the currently-under-review patches are merged.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mutex: make mutex_lock_nested an inline function
Date: Wed, 14 Oct 2015 11:00:20 +0200	[thread overview]
Message-ID: <11240940.NHO2vFoJOz@wuerfel> (raw)
In-Reply-To: <20151014083707.GR11639@twins.programming.kicks-ass.net>

On Wednesday 14 October 2015 10:37:07 Peter Zijlstra wrote:
> On Wed, Oct 14, 2015 at 10:20:50AM +0200, Peter Zijlstra wrote:
> > > > On Tue, Oct 13, 2015 at 10:30:08PM +0200, Arnd Bergmann wrote:
> > > > > The second argument of the mutex_lock_nested() helper is only
> > > > > evaluated if CONFIG_DEBUG_LOCK_ALLOC is set. Otherwise we
> > > > > get this build warning for the new regulator_lock_supply
> > > > > function:
> > > > > 
> > > > > drivers/regulator/core.c: In function 'regulator_lock_supply':
> > > > > drivers/regulator/core.c:142:6: warning: unused variable 'i' [-Wunused-variable]
> > > > > 
> > > > > To avoid the warning, this patch changes the definition of
> > > > > mutex_lock_nested() to be static inline function rather than
> > > > > a macro, which tells gcc that the variable is potentially
> > > > > used.
> > 
> > Uuh, I just looked at next and saw this regulator_lock_supply()
> > function. How is that limited? subclass must be <8 otherwise bad things
> > happen.
> 
> Also, the function appears unused, just delete it 

That was my first suggestion as well when I ran into 

drivers/regulator/core.c:139:13: warning: 'regulator_lock_supply' defined but not used

but apparently this is work-in-progress and the plan is to use it
in 4.4 when the rest of the currently-under-review patches are merged.

	Arnd

  reply	other threads:[~2015-10-14  9:00 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-13 20:30 [PATCH] mutex: make mutex_lock_nested an inline function Arnd Bergmann
2015-10-13 20:30 ` Arnd Bergmann
2015-10-13 20:38 ` Peter Zijlstra
2015-10-13 20:38   ` Peter Zijlstra
2015-10-13 21:46   ` Arnd Bergmann
2015-10-13 21:46     ` Arnd Bergmann
2015-10-14  8:20     ` Peter Zijlstra
2015-10-14  8:20       ` Peter Zijlstra
2015-10-14  8:37       ` Peter Zijlstra
2015-10-14  8:37         ` Peter Zijlstra
2015-10-14  9:00         ` Arnd Bergmann [this message]
2015-10-14  9:00           ` Arnd Bergmann
2015-10-14  9:08           ` Peter Zijlstra
2015-10-14  9:08             ` Peter Zijlstra
2015-10-14  9:59             ` Mark Brown
2015-10-14  9:59               ` Mark Brown
2015-10-14 10:27       ` Mark Brown
2015-10-14 10:27         ` Mark Brown
2015-10-14 11:07         ` Peter Zijlstra
2015-10-14 11:07           ` Peter Zijlstra
2015-10-14 12:36           ` Mark Brown
2015-10-14 12:36             ` Mark Brown
2015-10-14 13:47             ` Peter Zijlstra
2015-10-14 13:47               ` Peter Zijlstra
2015-10-14 13:50               ` Peter Zijlstra
2015-10-14 13:50                 ` Peter Zijlstra
2015-10-14 13:58                 ` Ingo Molnar
2015-10-14 13:58                   ` Ingo Molnar
2015-10-14 14:11               ` Mark Brown
2015-10-14 14:11                 ` Mark Brown
2015-10-22 15:02     ` Arnd Bergmann
2015-10-22 15:02       ` Arnd Bergmann
2015-10-22 15:09       ` Peter Zijlstra
2015-10-22 15:09         ` Peter Zijlstra
2015-10-22 17:44         ` Russell King - ARM Linux
2015-10-22 17:44           ` Russell King - ARM Linux
2015-10-27 18:13           ` Ingo Molnar
2015-10-27 18:13             ` Ingo Molnar

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=11240940.NHO2vFoJOz@wuerfel \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    /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.